[llvm] r267490 - [CMake] If set we should pass LLVM_VERSION_INFO into config.h
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 16:02:48 PDT 2016
Author: cbieneman
Date: Mon Apr 25 18:02:47 2016
New Revision: 267490
URL: http://llvm.org/viewvc/llvm-project?rev=267490&view=rev
Log:
[CMake] If set we should pass LLVM_VERSION_INFO into config.h
Autoconf used to support setting LLVM_VERSION_INFO and there is some code filtered around llvm in Support/CommandLine.cpp and LTO/LTOCodeGenerator.cpp that uses it if it is set.
We also shouldn't be explicitly setting it as a define on llvm-shlib. It is pointless there because there is no code using it in llvm-shlib, and it is better to have it as part of the generated config.h so that it is available everywhere.
Modified:
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/tools/llvm-shlib/CMakeLists.txt
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=267490&r1=267489&r2=267490&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Mon Apr 25 18:02:47 2016
@@ -499,6 +499,9 @@
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
+/* LLVM version information */
+#cmakedefine LLVM_VERSION_INFO "${LLVM_VERSION_INFO}"
+
/* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS
Modified: llvm/trunk/tools/llvm-shlib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/CMakeLists.txt?rev=267490&r1=267489&r2=267490&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-shlib/CMakeLists.txt Mon Apr 25 18:02:47 2016
@@ -2,8 +2,6 @@
# library is enabled by setting LLVM_BUILD_LLVM_DYLIB=yes on the CMake
# commandline. By default the shared library only exports the LLVM C API.
-add_definitions( -DLLVM_VERSION_INFO=\"${PACKAGE_VERSION}\" )
-
set(SOURCES
libllvm.cpp
)
More information about the llvm-commits
mailing list