summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--autoconf/configure.ac2
-rw-r--r--cmake/modules/LLVMConfig.cmake.in2
-rwxr-xr-xconfigure12
-rw-r--r--include/llvm/Config/config.h.cmake6
-rw-r--r--include/llvm/Config/config.h.in6
-rw-r--r--include/llvm/Config/llvm-config.h.cmake6
-rw-r--r--include/llvm/Config/llvm-config.h.in6
8 files changed, 45 insertions, 4 deletions
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)
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 0691f1fd4d..3a86531a9d 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 6b202b2e7e..443ec41532 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 7acea4e63a..060d1e6329 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 <<EOF
-#line 10456 "configure"
+#line 10466 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake
index 8d913e9a2f..c475014252 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -617,6 +617,12 @@
/* Installation prefix directory */
#cmakedefine LLVM_PREFIX "${LLVM_PREFIX}"
+/* Major version of the LLVM API */
+#cmakedefine LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}
+
+/* Minor version of the LLVM API */
+#cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+
/* Define if the OS needs help to load dependent libraries for dlopen(). */
#cmakedefine LTDL_DLOPEN_DEPLIBS ${LTDL_DLOPEN_DEPLIBS}
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index 3b20355276..1a996a20da 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -615,6 +615,12 @@
/* Installation prefix directory */
#undef LLVM_PREFIX
+/* Major version of the LLVM API */
+#undef LLVM_VERSION_MAJOR
+
+/* Minor version of the LLVM API */
+#undef LLVM_VERSION_MINOR
+
/* Define if the OS needs help to load dependent libraries for dlopen(). */
#undef LTDL_DLOPEN_DEPLIBS
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index 0c5b542679..3a55e6ba92 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -106,4 +106,10 @@
/* Installation prefix directory */
#cmakedefine LLVM_PREFIX "${LLVM_PREFIX}"
+/* Major version of the LLVM API */
+#cmakedefine LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}
+
+/* Minor version of the LLVM API */
+#cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
+
#endif
diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in
index 30a935bf9c..2613366647 100644
--- a/include/llvm/Config/llvm-config.h.in
+++ b/include/llvm/Config/llvm-config.h.in
@@ -106,4 +106,10 @@
/* Installation prefix directory */
#undef LLVM_PREFIX
+/* Major version of the LLVM API */
+#undef LLVM_VERSION_MAJOR
+
+/* Minor version of the LLVM API */
+#undef LLVM_VERSION_MINOR
+
#endif