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.

llvm-svn: 122240
This commit is contained in:
Oscar Fuentes 2010-12-20 09:47:13 +00:00
parent be64b15d1e
commit dd676ee5b1
2 changed files with 14 additions and 1 deletions

View File

@ -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}")

View File

@ -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>