[CMake] Adjust the variables set by LLVMConfig.cmake
authorJohn Brawn <john.brawn@arm.com>
Wed, 30 Sep 2015 10:34:06 +0000 (10:34 +0000)
committerJohn Brawn <john.brawn@arm.com>
Wed, 30 Sep 2015 10:34:06 +0000 (10:34 +0000)
When using LLVMConfig.cmake from an installed toolchain in order to build a
loadable pass using add_llvm_loadable_module LLVM_ENABLE_PLUGINS and
LLVM_PLUGIN_EXT must be set. Also make LLVM_DEFINITIONS be set to what it
actually is.

Differential Revision: http://reviews.llvm.org/D13214

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248884 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/LLVMConfig.cmake.in

index 5b7789d..6855c44 100644 (file)
@@ -39,6 +39,9 @@ set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@)
 
 set(LLVM_ENABLE_PIC @LLVM_ENABLE_PIC@)
 
+set(LLVM_ENABLE_PLUGINS @LLVM_ENABLE_PLUGINS@)
+set(LLVM_PLUGIN_EXT @LLVM_PLUGIN_EXT@)
+
 set(LLVM_ON_UNIX @LLVM_ON_UNIX@)
 set(LLVM_ON_WIN32 @LLVM_ON_WIN32@)
 
@@ -46,7 +49,7 @@ set(LLVM_LIBDIR_SUFFIX @LLVM_LIBDIR_SUFFIX@)
 
 set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@")
 set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@")
-set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS")
+set(LLVM_DEFINITIONS "@LLVM_DEFINITIONS@")
 set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
 set(LLVM_TOOLS_BINARY_DIR "@LLVM_CONFIG_TOOLS_BINARY_DIR@")