aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--docs/CMake.html6
2 files changed, 14 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df2f8d5d51..3f48b58f43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,8 +11,15 @@ set(CMAKE_MODULE_PATH
)
set(PACKAGE_VERSION "2.9")
+
include(VersionFromVCS)
-add_version_info_from_vcs(PACKAGE_VERSION)
+
+option(LLVM_APPEND_VC_REV
+ "Append the version control system revision id to LLVM version" OFF)
+
+if( LLVM_APPEND_VC_REV )
+ add_version_info_from_vcs(PACKAGE_VERSION)
+endif()
set(PACKAGE_NAME llvm)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
diff --git a/docs/CMake.html b/docs/CMake.html
index c5c5538264..0bafedd9b0 100644
--- a/docs/CMake.html
+++ b/docs/CMake.html
@@ -286,6 +286,12 @@
ON. You can use that option for disabling the generation of build
targets for the LLVM unit tests.</dd>
+ <dt><b>LLVM_APPEND_VC_REV</b>:BOOL</dt>
+ <dd>Append version control revision info (svn revision number or git
+ revision id) to LLVM version string (stored in the PACKAGE_VERSION
+ macro). For this to work cmake must be invoked before the
+ build. Defaults to OFF.</dd>
+
<dt><b>LLVM_ENABLE_THREADS</b>:BOOL</dt>
<dd>Build with threads support, if available. Defaults to ON.</dd>