View Issue Details

IDProjectCategoryView StatusLast Update
0002125FreeCADBugpublic2017-01-11 15:32
Reporterhobbes1069 Assigned Towmayer  
Status closedResolutionfixed 
PlatformLinuxOSFedoraOS VersionMultiple
Product Version0.15 
Fixed in Version0.17 
Summary0002125: CMake shouldn't generate for release tarballs.
DescriptionThe 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 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

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 InformationSince 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 @@
+# Do not generate a new Version.h if the source is a release tarball.
+ add_subdirectory(Build)
TagsNo tags attached.
FreeCAD Information



2017-01-10 17:46

administrator   ~0007614

Forum thread:

Related Changesets

FreeCAD: master 675bcc25

2017-01-11 16:31:37


Details Diff
fixes 0002125: CMake shouldn't generate for release tarballs. Affected Issues
mod - src/Build/CMakeLists.txt Diff File

Issue History

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