diff options
author | Chris Bieneman <beanz@apple.com> | 2016-06-24 20:21:12 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-06-24 20:21:12 +0000 |
commit | 38238a4f56673f6b71e4776b108604118dd688e1 (patch) | |
tree | 4f8490f8978ffc2bdffef0df674116ea23f58f5e /clang/lib/Basic | |
parent | 82d5da5aac4ad77978326ba1c19966e224a5f700 (diff) | |
download | bcm5719-llvm-38238a4f56673f6b71e4776b108604118dd688e1.tar.gz bcm5719-llvm-38238a4f56673f6b71e4776b108604118dd688e1.zip |
[CMake] Remove CLANG_APPEND_VC_REV option
I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem.
Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf).
The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems.
This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary.
llvm-svn: 273714
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt index cfad8c3649e..7524b8cd121 100644 --- a/clang/lib/Basic/CMakeLists.txt +++ b/clang/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 |