summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
-rw-r--r--lib/Basic/CMakeLists.txt7
2 files changed, 7 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 114d23095e..6a65608954 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -214,19 +214,6 @@ if(CLANG_REPOSITORY_STRING)
add_definitions(-DCLANG_REPOSITORY_STRING="${CLANG_REPOSITORY_STRING}")
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(SVN_REVISION)
- add_definitions(-DSVN_REVISION="${SVN_REVISION}")
- endif()
-endif()
-
set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
"Vendor-specific uti.")
diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt
index cfad8c3649..7524b8cd12 100644
--- a/lib/Basic/CMakeLists.txt
+++ b/lib/Basic/CMakeLists.txt
@@ -53,6 +53,13 @@ if(DEFINED llvm_vc AND DEFINED clang_vc)
else()
# Not producing a VC revision include.
set(version_inc)
+
+ # Being able to force-set the SVN revision in cases where it isn't available
+ # is useful for performance tracking, and matches compatibility from autoconf.
+ if(SVN_REVISION)
+ set_source_files_properties(Version.cpp
+ PROPERTIES COMPILE_DEFINITIONS "SVN_REVISION=\"${SVN_REVISION}\"")
+ endif()
endif()
add_clang_library(clangBasic