[polly] r203841 - record in POLLY_LINK_LIBS all the libs needed for polly
Sebastian Pop
spop at codeaurora.org
Thu Mar 13 13:24:49 PDT 2014
Author: spop
Date: Thu Mar 13 15:24:48 2014
New Revision: 203841
URL: http://llvm.org/viewvc/llvm-project?rev=203841&view=rev
Log:
record in POLLY_LINK_LIBS all the libs needed for polly
Modified:
polly/trunk/CMakeLists.txt
polly/trunk/cmake/polly_macros.cmake
polly/trunk/lib/CMakeLists.txt
Modified: polly/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/CMakeLists.txt?rev=203841&r1=203840&r2=203841&view=diff
==============================================================================
--- polly/trunk/CMakeLists.txt (original)
+++ polly/trunk/CMakeLists.txt Thu Mar 13 15:24:48 2014
@@ -82,15 +82,27 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
FIND_PACKAGE(Isl REQUIRED)
+set(POLLY_LINK_LIBS ${ISL_LIBRARY})
+
FIND_PACKAGE(Pluto)
+if(PLUTO_FOUND)
+ set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} ${PLUTO_LIBRARY})
+endif(PLUTO_FOUND)
option(POLLY_USE_CLOOG "Build Polly with Cloog support" ON)
-if (POLLY_USE_CLOOG)
+if(POLLY_USE_CLOOG)
# Build Cloog support in Polly (default is for cloog-isl).
FIND_PACKAGE(Cloog)
FIND_PACKAGE(Gmp REQUIRED)
+ if(CLOOG_FOUND)
+ set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} ${CLOOG_LIBRARY})
+ endif(CLOOG_FOUND)
endif(POLLY_USE_CLOOG)
+if(GMP_FOUND)
+ set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} ${GMP_LIBRARY})
+endif(GMP_FOUND)
+
option(POLLY_ENABLE_GPGPU_CODEGEN "Enable GPGPU code generation feature" OFF)
if (POLLY_ENABLE_GPGPU_CODEGEN)
# Do not require CUDA, as GPU code generation test cases can be run without
@@ -102,11 +114,17 @@ endif(POLLY_ENABLE_GPGPU_CODEGEN)
option(POLLY_ENABLE_OPENSCOP "Enable Openscop library for scop import/export" ON)
if (POLLY_ENABLE_OPENSCOP)
FIND_PACKAGE(OpenScop)
+ if(OPENSCOP_FOUND)
+ set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} ${OPENSCOP_LIBRARY})
+ endif(OPENSCOP_FOUND)
endif(POLLY_ENABLE_OPENSCOP)
option(POLLY_ENABLE_SCOPLIB "Enable SCoPLib library for scop import/export" ON)
if (POLLY_ENABLE_SCOPLIB)
FIND_PACKAGE(SCoPLib)
+ if(SCOPLIB_FOUND)
+ set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} ${SCOPLIB_LIBRARY})
+ endif(SCOPLIB_FOUND)
endif(POLLY_ENABLE_SCOPLIB)
if (CLOOG_FOUND)
@@ -179,3 +197,6 @@ add_custom_command( OUTPUT formatting-up
CLANG_FORMAT=${LLVM_BINARY_DIR}/bin/clang-format
${CMAKE_CURRENT_SOURCE_DIR}/utils/update_format.sh ${files})
add_custom_target(polly-update-format DEPENDS formatting-update)
+
+# Set the variable POLLY_LINK_LIBS in the llvm/tools/ dir.
+set(POLLY_LINK_LIBS ${POLLY_LINK_LIBS} PARENT_SCOPE)
Modified: polly/trunk/cmake/polly_macros.cmake
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/cmake/polly_macros.cmake?rev=203841&r1=203840&r2=203841&view=diff
==============================================================================
--- polly/trunk/cmake/polly_macros.cmake (original)
+++ polly/trunk/cmake/polly_macros.cmake Thu Mar 13 15:24:48 2014
@@ -27,18 +27,11 @@ macro(add_polly_library name)
endforeach(lib)
endif( LLVM_USED_LIBS )
- target_link_libraries( ${name} ${ISL_LIBRARY})
-
- if (CLOOG_FOUND)
- target_link_libraries( ${name} ${CLOOG_LIBRARY} ${GMP_LIBRARY})
- endif(CLOOG_FOUND)
-
- if (OPENSCOP_FOUND)
- target_link_libraries( ${name} ${OPENSCOP_LIBRARY})
- endif(OPENSCOP_FOUND)
- if (SCOPLIB_FOUND)
- target_link_libraries( ${name} ${SCOPLIB_LIBRARY})
- endif(SCOPLIB_FOUND)
+ if(POLLY_LINK_LIBS)
+ foreach(lib ${POLLY_LINK_LIBS})
+ target_link_libraries(${name} ${lib})
+ endforeach(lib)
+ endif(POLLY_LINK_LIBS)
if( LLVM_LINK_COMPONENTS )
llvm_config(${name} ${LLVM_LINK_COMPONENTS})
Modified: polly/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CMakeLists.txt?rev=203841&r1=203840&r2=203841&view=diff
==============================================================================
--- polly/trunk/lib/CMakeLists.txt (original)
+++ polly/trunk/lib/CMakeLists.txt Thu Mar 13 15:24:48 2014
@@ -89,7 +89,3 @@ set_target_properties(LLVMPolly
PROPERTIES
LINKER_LANGUAGE CXX
PREFIX "")
-
-if (PLUTO_FOUND)
- target_link_libraries(LLVMPolly ${PLUTO_LIBRARY})
-endif(PLUTO_FOUND)
More information about the llvm-commits
mailing list