r258143 - [CMake] Properly respect the CLANG_APPEND_VC_REV option
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 19 09:06:12 PST 2016
Author: cbieneman
Date: Tue Jan 19 11:06:12 2016
New Revision: 258143
URL: http://llvm.org/viewvc/llvm-project?rev=258143&view=rev
Log:
[CMake] Properly respect the CLANG_APPEND_VC_REV option
Only set -DSVN_REVISION if CLANG_APPEND_VC_REV=On
Modified:
cfe/trunk/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=258143&r1=258142&r2=258143&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Tue Jan 19 11:06:12 2016
@@ -216,14 +216,15 @@ endif()
option(CLANG_APPEND_VC_REV
"Append the version control system revision id to clang version spew" OFF)
+if(CLANG_APPEND_VC_REV)
+ if(NOT SVN_REVISION)
+ # This macro will set SVN_REVISION in the parent scope
+ add_version_info_from_vcs(VERSION_VAR)
+ endif()
-if(NOT SVN_REVISION)
- # This macro will set SVN_REVISION in the parent scope
- add_version_info_from_vcs(VERSION_VAR)
-endif()
-
-if(SVN_REVISION)
- add_definitions(-DSVN_REVISION="${SVN_REVISION}")
+ if(SVN_REVISION)
+ add_definitions(-DSVN_REVISION="${SVN_REVISION}")
+ endif()
endif()
set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
More information about the cfe-commits
mailing list