diff options
| author | click <none@none> | 2010-10-14 22:48:55 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-10-14 22:48:55 +0200 |
| commit | 88f196f1a97073b9428d02b16f751af843dfd3ca (patch) | |
| tree | 9a859d61d445bc9be6c8f370e9cbc26770dec0ab /cmake | |
| parent | a735d84ecf61fbb05da160ce9ce986d84254f282 (diff) | |
BuildSystem: Cache results from when pulling the revision-information to avoid regenerating revision.h
(should remove the unneeded rebuilding of some core-files due to that the revision.h file has changed timestamp-wise)
--HG--
branch : trunk
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/genrev.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake index 9fe49139717..29d95b4f8ff 100644 --- a/cmake/genrev.cmake +++ b/cmake/genrev.cmake @@ -62,8 +62,12 @@ if(NOT BUILDDIR) endif() # Create the actual revision.h file from the above params -configure_file( - "${CMAKE_SOURCE_DIR}/revision.h.in.cmake" - "${BUILDDIR}/revision.h" - @ONLY -) + +if(NOT hg_rev_id MATCHES "${hg_rev_id_cached}") + configure_file( + "${CMAKE_SOURCE_DIR}/revision.h.in.cmake" + "${BUILDDIR}/revision.h" + @ONLY + ) + set(hg_rev_id_cached ${hg_rev_id} CACHE TYPE STRING) +endif() |
