summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-09-12 16:17:41 +0000
committerJordan Rose <jordan_rose@apple.com>2013-09-12 16:17:41 +0000
commitf31f5f84888e9dd67e793598d19040ce0e0dd6a5 (patch)
tree425b38e77be1da154d99bc0a8948ef36ed5a9419 /clang/lib/Basic
parentd6d1b52937152bb0d45bb239774004a1d0feba48 (diff)
downloadbcm5719-llvm-f31f5f84888e9dd67e793598d19040ce0e0dd6a5.tar.gz
bcm5719-llvm-f31f5f84888e9dd67e793598d19040ce0e0dd6a5.zip
[CMake] Put controversial always-recheck-revision-number behind an option.
CMake does not have the ability to perform actions before calculating dependencies, so it can't know whether it needs to rebuild clangBasic to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by default) will cause clangBasic to always be dirty by deleting the generated SVNVersion.inc after use; otherwise, SVNVersion.inc will always be updated, but only included in the final binary when clangBasic is rebuilt. It'd be great to find a better way to do this, but hopefully this is still an improvement over the complete lack of version information before. llvm-svn: 190613
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
index 45278ae55d8..4eccfdeee55 100644
--- a/clang/lib/Basic/CMakeLists.txt
+++ b/clang/lib/Basic/CMakeLists.txt
@@ -59,5 +59,11 @@ add_dependencies(clangBasic
clang_revision_tag
)
-add_custom_command(TARGET clangBasic POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
+# Force regeneration now.
+FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
+
+if(CLANG_ALWAYS_CHECK_VC_REV)
+ add_custom_command(TARGET clangBasic POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
+endif()
OpenPOWER on IntegriCloud