From fde8237cd9c7e0eb503e6c53994c9c9d19cbb4c6 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Mon, 13 Feb 2012 18:48:10 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150405 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 522c91c495..5313d110d2 100644 --- a/CMakeLists.txt +++ b/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) -- cgit v1.2.3