[llvm-commits] [llvm] r122240 - in /llvm/trunk: CMakeLists.txt docs/CMake.html

Oscar Fuentes ofv at wanadoo.es
Mon Dec 20 01:47:13 PST 2010


Author: ofv
Date: Mon Dec 20 03:47:13 2010
New Revision: 122240

URL: http://llvm.org/viewvc/llvm-project?rev=122240&view=rev
Log:
New cmake option LLVM_APPEND_VC_REV for controlling when the VC
revision id is appended to the LLVM version string. Defaults to
OFF.

Until now the VC revision id was always appended to the revision
string whenever cmake was invoked (either explicitly or implicitly
because a cmake source file changed). This was causing massive
recompilations because config.h are reconfigured with the new contents
of PACKAGE_VERSION.

Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/docs/CMake.html

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=122240&r1=122239&r2=122240&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Dec 20 03:47:13 2010
@@ -11,8 +11,15 @@
   )
 
 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}")

Modified: llvm/trunk/docs/CMake.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.html?rev=122240&r1=122239&r2=122240&view=diff
==============================================================================
--- llvm/trunk/docs/CMake.html (original)
+++ llvm/trunk/docs/CMake.html Mon Dec 20 03:47:13 2010
@@ -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>
 





More information about the llvm-commits mailing list