summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-06-25 23:34:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-06-25 23:34:47 +0000
commitc4b8e923a18ba56ecd76de5dfd7edf7f307123e3 (patch)
treec8056105066b6241eb78f125e209a55807c205b0 /CMakeLists.txt
parent4d912b24b393fe6b7422e5502f3a330cbdc5c6b7 (diff)
clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 2 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6154fdb66f..1ba2a622d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,5 @@
# Clang version information
-# Make sure that CMake reconfigures when the version changes.
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/VER
- ${CMAKE_CURRENT_BINARY_DIR}/VER)
-
set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -28,10 +23,9 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
endif()
endif()
-# Compute the Clang version from the contents of VER
-file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VER CLANG_VERSION_DATA)
+# Compute the Clang version from the LLVM version.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
- ${CLANG_VERSION_DATA})
+ ${PACKAGE_VERSION})
message(STATUS "Clang version: ${CLANG_VERSION}")
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR