diff options
author | Chris Bieneman <beanz@apple.com> | 2016-01-19 17:06:12 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-01-19 17:06:12 +0000 |
commit | 30395ea6a760198a47fbc6e9567aafd8970d938c (patch) | |
tree | 9ad563e4433ae19326c651303b1400f9cab46f49 /CMakeLists.txt | |
parent | 77ca687869b3adaa82d774d6c3c3bc5e4598555c (diff) |
[CMake] Properly respect the CLANG_APPEND_VC_REV option
Only set -DSVN_REVISION if CLANG_APPEND_VC_REV=On
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5482017029..861fa964f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 |