View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002125 | FreeCAD | Bug | public | 2015-05-28 16:26 | 2017-01-11 15:32 |
Reporter | hobbes1069 | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Fedora | OS Version | Multiple |
Product Version | 0.15 | ||||
Fixed in Version | 0.17 | ||||
Summary | 0002125: CMake shouldn't generate Version.in for release tarballs. | ||||
Description | The CMake config tries to get the revision information using git, svn, mecurial, etc and when all that fails the fallback is to just read in the Version.h.in and write it out to Version.h in the CMAKE_BINARY_DIR. In src/Build/CMakeLists.txt: # as fallback if Version.h isn't created for any reason if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Version.h) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/Version.h.in VERSION_INFO) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Version.h ${VERSION_INFO}) endif (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Version.h) Since I'm using a tarball, all the "smart" methods fail and the fallback is executed. The problem is that there is already a Version.h in the source directory with the correct information but the one in the binary directory is found first. The CMake config needs to be updated to check for the existence of the Version.h in the source tree before creating one in the binary tree. | ||||
Additional Information | Since the entirety of the cmake config in src/Build is around version detection, my proposal is to skip it if Version.h is found in the source tree: diff -Naur freecad-0.14.3702.orig/src/CMakeLists.txt freecad-0.14.3702/src/CMakeLists.txt --- freecad-0.14.3702.orig/src/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500 +++ freecad-0.14.3702/src/CMakeLists.txt 2015-05-28 11:08:21.169188616 -0500 @@ -1,5 +1,7 @@ - -add_subdirectory(Build) +# Do not generate a new Version.h if the source is a release tarball. +if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Build/Version.h) + add_subdirectory(Build) +endif() add_subdirectory(3rdParty) add_subdirectory(Base) add_subdirectory(App) | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-05-28 16:26 | hobbes1069 | New Issue | |
2017-01-10 17:46 | Kunda1 | Note Added: 0007614 | |
2017-01-10 18:33 | wmayer | Assigned To | => wmayer |
2017-01-10 18:33 | wmayer | Status | new => assigned |
2017-01-11 15:32 | wmayer | Changeset attached | => FreeCAD Master master 675bcc25 |
2017-01-11 15:32 | wmayer | Status | assigned => closed |
2017-01-11 15:32 | wmayer | Resolution | open => fixed |
2017-01-11 15:32 | wmayer | Fixed in Version | => 0.17 |