Skip to content

Commit

Permalink
The CMake build system now derives the Clang version number from VER.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82085 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
DougGregor committed Sep 16, 2009
1 parent b123ea3 commit 34d9ffa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
@@ -1,6 +1,15 @@
# Clang version information
# FIXME: get from a file called ./VER
set(CLANG_VERSION 1.1)

# Make sure that CMake reconfigures when the version changes.
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/VER
${CMAKE_CURRENT_BINARY_DIR}/VER)

# Compute the Clang version from the contents of VER
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VER CLANG_VERSION_DATA)
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
${CLANG_VERSION_DATA})
message(STATUS "Clang version: ${CLANG_VERSION}")

macro(add_clang_library name)
set(srcs ${ARGN})
Expand Down

0 comments on commit 34d9ffa

Please sign in to comment.