summaryrefslogtreecommitdiffstats
path: root/llvm/CMakeLists.txt
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-13 18:48:10 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-02-13 18:48:10 +0000
commitc6c7a5819de234460d90114467df2446e5f1c0a3 (patch)
tree6a6abd5f4a2c538ed4c27e5a9d26f389ae4618a7 /llvm/CMakeLists.txt
parent6f8fe71216be0af3faa9afc0fcbb81aa76a80b11 (diff)
downloadbcm5719-llvm-c6c7a5819de234460d90114467df2446e5f1c0a3.tar.gz
bcm5719-llvm-c6c7a5819de234460d90114467df2446e5f1c0a3.zip
add LLVM_VERSION_MAJOR and _MINOR defines
This is useful for clients that want to maintain compatibility across multiple releases of LLVM. Currently users like Klee and Mesa all have to roll their own 'parse llvm-config --version output and generate defines' solution. Also reuse the new macros so that version information is less redundant/likely to fall out of sync again in the future. llvm-svn: 150405
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r--llvm/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 522c91c495f..5313d110d2c 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -10,7 +10,10 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
-set(PACKAGE_VERSION "3.1svn")
+set(LLVM_VERSION_MAJOR 3)
+set(LLVM_VERSION_MINOR 1)
+
+set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -411,8 +414,8 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
# TODO: make and install documentation.
set(CPACK_PACKAGE_VENDOR "LLVM")
-set(CPACK_PACKAGE_VERSION_MAJOR 3)
-set(CPACK_PACKAGE_VERSION_MINOR 1)
+set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR})
add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
include(CPack)
OpenPOWER on IntegriCloud