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
This commit is contained in:
Dylan Noblesmith
2012-02-13 18:48:10 +00:00
parent 3ed4dee530
commit fde8237cd9
8 changed files with 45 additions and 4 deletions
+6
View File
@@ -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}
+6
View File
@@ -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
+6
View File
@@ -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
+6
View File
@@ -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