diff options
author | Shauren <none@none> | 2010-10-03 16:55:24 +0200 |
---|---|---|
committer | Shauren <none@none> | 2010-10-03 16:55:24 +0200 |
commit | 729e618baa0db0ada6a54174c19cd403c5f7b8d8 (patch) | |
tree | 3428fdb9a67965943a6008dba99b762154eec5f1 | |
parent | 6c35c376e9abc8a5b221ffbff7954f99b6835039 (diff) |
Buildsystem: Generate revision.h additionally during initial cmake run, also fixes displaying revision during run
--HG--
branch : trunk
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/genrev.cmake | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2847f3d8499..c9a4c1a742c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,9 @@ if( UNIX ) find_package(BZip2) endif() +# Find revision ID and hash of the sourcetree +include(cmake/genrev.cmake) + # print out the results before continuing include(cmake/showoptions.cmake) diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake index ecc9c282c9e..860e6d98709 100644 --- a/cmake/genrev.cmake +++ b/cmake/genrev.cmake @@ -56,6 +56,11 @@ if(NOT hg_rev_id_str MATCHES "Archive") endif() string(REPLACE "+" "" hg_rev_hash ${hg_rev_hash_str}) +# Its not set during initial run +if(NOT BUILDDIR) + set(BUILDDIR ${CMAKE_BINARY_DIR}) +endif() + # Create the actual revision.h file from the above params configure_file( "${CMAKE_SOURCE_DIR}/revision.h.in.cmake" |