diff --git a/CMakeLists.txt b/CMakeLists.txt index 522c91c495f..5313d110d2c 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) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 0691f1fd4d1..3a86531a9d9 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -32,6 +32,8 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. AC_INIT([LLVM],[3.1svn],[http://llvm.org/bugs/]) +AC_DEFINE([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API]) +AC_DEFINE([LLVM_VERSION_MINOR], [1], [Minor version of the LLVM API]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in index 6b202b2e7e8..443ec415328 100644 --- a/cmake/modules/LLVMConfig.cmake.in +++ b/cmake/modules/LLVMConfig.cmake.in @@ -1,5 +1,7 @@ # This file provides information and services to the final user. +set(LLVM_VERSION_MAJOR @LLVM_VERSION_MAJOR@) +set(LLVM_VERSION_MINOR @LLVM_VERSION_MINOR@) set(LLVM_PACKAGE_VERSION @PACKAGE_VERSION@) set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) diff --git a/configure b/configure index 7acea4e63a1..060d1e63291 100755 --- a/configure +++ b/configure @@ -1898,6 +1898,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +cat >>confdefs.h <<\_ACEOF +#define LLVM_VERSION_MAJOR 3 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LLVM_VERSION_MINOR 1 +_ACEOF + + LLVM_COPYRIGHT="Copyright (c) 2003-2012 University of Illinois at Urbana-Champaign." @@ -10453,7 +10463,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <