From 17a8b791aef3c452c666b365c25f67254000cd6d Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 25 Aug 2016 11:28:52 +0000 Subject: [PATCH] Add LLVM libdir to library search path in out-of-tree builds. This previously was not required because in an out-of-tree build Polly would only build libraries (LLVMPolly, libPolly, libPollyISL, libPollyPPCG), but no executables where the libraries would be linked to. This will change when adding unittests in a follow-up commit. llvm-svn: 279730 --- polly/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt index 7ee67bc..6fc7193 100644 --- a/polly/CMakeLists.txt +++ b/polly/CMakeLists.txt @@ -38,6 +38,11 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR) set(${return_var} ${system_libs} PARENT_SCOPE) endfunction(get_system_libs) + execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --libdir + OUTPUT_VARIABLE LLVM_LIBRARY_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE) + link_directories("${LLVM_LIBRARY_DIR}") + # Now set the header paths. execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIR -- 2.7.4