about summary refs log tree commit diff homepage
path: root/cmake
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2019-07-26 15:43:03 +0200
committerMartinNowack <martin.nowack@gmail.com>2019-07-30 14:49:24 +0100
commitd1f714b72da1674f6f784a8a1b2a6179f103b723 (patch)
tree77dcc0377c4f25f7556b1ed02640c0912ed5aa0a /cmake
parenta179130b17686c85caed1853a822ecd1bd4d7d11 (diff)
downloadklee-d1f714b72da1674f6f784a8a1b2a6179f103b723.tar.gz
CMake: fix LLVM_DEFINITIONS with find_package()
Diffstat (limited to 'cmake')
-rw-r--r--cmake/find_llvm.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake
index 874bd1ae..8527221a 100644
--- a/cmake/find_llvm.cmake
+++ b/cmake/find_llvm.cmake
@@ -33,8 +33,14 @@ if (USE_CMAKE_FIND_PACKAGE_LLVM)
     llvm_map_components_to_libnames(${output_var} ${ARGN})
     set(${output_var} ${${output_var}} PARENT_SCOPE)
   endfunction()
+
   # HACK: This information is not exported so just pretend its OFF for now.
   set(LLVM_ENABLE_VISIBILITY_INLINES_HIDDEN OFF)
+
+  # make LLVM_DEFINITIONS into proper list
+  set(_new_llvm_definitions "${LLVM_DEFINITIONS}")
+  string(REPLACE " " ";" LLVM_DEFINITIONS "${_new_llvm_definitions}")
+  unset(_new_llvm_definitions)
 else()
   # Use the llvm-config binary to get the information needed.
   # Try to detect it in the user's environment. The user can force a particular