Skip to content

Commit

Permalink
Generate cisstRevision.h only if content has changed. Use temporary f…
Browse files Browse the repository at this point in the history
…ile and then CMake -E copy_if_different
  • Loading branch information
adeguet1 committed Feb 5, 2015
1 parent 6fb8a64 commit 3ae04a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/cisstGenerateRevision.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ endif (GIT_FOUND)
message ("Found Git revision: ${CISST_GIT_DESCRIBE}")

configure_file ("${CISST_REVISION_HEADER_SRC}"
"${CISST_REVISION_HEADER}")
"${CMAKE_CURRENT_SOURCE_DIR}/cisstRevision.h.tmp")

execute_process (COMMAND
${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/cisstRevision.h.tmp"
"${CISST_REVISION_HEADER}")

0 comments on commit 3ae04a1

Please sign in to comment.