Bug report #13680

compile fails attempting to generate qgsversion.h

Added by William Kyngesburye over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:master Regression?:No
Operating System:OS X Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21712

Description

In QGIS 2.10, qgsversion was set wrong (empty), but at least it was set. Now in 2.12 (release) it causes compilation to fail with:

fatal: Not a git repository (or any of the parent directories): .git
make[2]: *** [qgsversion.h] Error 128
make[1]: *** [CMakeFiles/version.dir/all] Error 2

It looks like the problem is that cmake is misidentifying the release source as a git repository, then it uses git to try to generate the version string, instead of the "exported" it should be.

FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)

According to the cmake docs, PATHS adds to a set of standard paths find_file looks in, and it ends up finding the "index" header in GEOS. To make it only look in the source/.git for the marker, add the NO_DEFAULT_PATH flag to find_file, like:

FIND_FILE(GIT_MARKER index NO_DEFAULT_PATH PATHS ${CMAKE_SOURCE_DIR}/.git)

Associated revisions

Revision 9a081df1
Added by Jürgen Fischer over 8 years ago

fix git marker detection (fixes #13680)

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Target version deleted (Version 2.12)

#2 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF