Skip to content
Snippets Groups Projects
Commit b070a284 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

git_revision.hpp is now regenerated when sources change

parent dfaee35f
No related branches found
No related tags found
No related merge requests found
...@@ -37,10 +37,12 @@ include(GetGitRevisionDescription) ...@@ -37,10 +37,12 @@ include(GetGitRevisionDescription)
get_git_head_revision(GITREV GITHASH) get_git_head_revision(GITREV GITHASH)
git_local_changes(GITHASLOCALCHANGES) git_local_changes(GITHASLOCALCHANGES)
add_custom_target(git_revision ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/git_revision.hpp)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/git_revision.hpp PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/git_revision.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/git_revision.hpp" @ONLY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/git_revision.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/git_revision.hpp" @ONLY)
list(APPEND SOURCES git_revision.hpp) list(APPEND SOURCES git_revision.hpp)
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})
add_executable(pastis main.cpp) add_executable(pastis main.cpp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment