Skip to content

Commit 17a8b79

Browse files
committed
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
1 parent 449cf3e commit 17a8b79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

polly/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
3838
set(${return_var} ${system_libs} PARENT_SCOPE)
3939
endfunction(get_system_libs)
4040

41+
execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --libdir
42+
OUTPUT_VARIABLE LLVM_LIBRARY_DIR
43+
OUTPUT_STRIP_TRAILING_WHITESPACE)
44+
link_directories("${LLVM_LIBRARY_DIR}")
45+
4146
# Now set the header paths.
4247
execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --includedir
4348
OUTPUT_VARIABLE LLVM_INCLUDE_DIR

0 commit comments

Comments
 (0)