[CMake] Properly respect the CLANG_APPEND_VC_REV option

Only set -DSVN_REVISION if CLANG_APPEND_VC_REV=On

llvm-svn: 258143
This commit is contained in:
Chris Bieneman 2016-01-19 17:06:12 +00:00
parent b6fd39a3a7
commit fac5905e55
1 changed files with 8 additions and 7 deletions

View File

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