diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-20 16:17:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-20 16:27:56 +0300 |
commit | 40d4da829cb234c013e857aee4e85902799c87f5 (patch) | |
tree | c17dc01edae656f5f0cd2d42bceee12d48e5ff88 /source | |
parent | 432d24f9981a4baac1b3c8e0e204e1303d1d4ba9 (diff) |
Fix/Workaround for CMake buildinfo error
Correcting the paths for buildinfo to point to the real header,
ended up breaking buildinfo (by not running every build).
It turns out we relied on the output _never_ existing,
so CMake generates a new buildinfo each time.
This is quite bad, but I didn't see a way for CMake to do this,
so explicitly point to a missing file and comment whats going on.
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 2dc995abb76..f0b6001cca1 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -167,12 +167,19 @@ if(WITH_BUILDINFO) # include the output directory, where the buildinfo.h file is generated include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + # XXX, "_buildinfo.h" is used twice here, + # because we rely on that file being detected as missing + # every build so that the real header "buildinfo.h" is updated. + # + # Keep this until we find a better way to resolve! + # a custom target that is always built add_custom_target(buildinfo ALL - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h) + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h) # creates buildinfo.h using cmake script - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/build_files/cmake/buildinfo.cmake) |