Mercurial > hg > CbC > CbC_llvm
comparison polly/cmake/PollyConfig.cmake.in @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 # This file allows users to call find_package(Polly) and pick up our targets. | |
2 | |
3 find_package(LLVM REQUIRED CONFIG | |
4 HINTS "@POLLY_CONFIG_LLVM_CMAKE_DIR@") | |
5 | |
6 set(Polly_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}) | |
7 set(Polly_BUNDLED_ISL @POLLY_BUNDLED_ISL@) | |
8 set(Polly_ENABLE_GPGPU_CODEGEN @POLLY_ENABLE_GPGPU_CODEGEN@) | |
9 | |
10 set(Polly_DEFINITIONS ${LLVM_DEFINITIONS}) | |
11 set(Polly_INCLUDE_DIRS @POLLY_CONFIG_INCLUDE_DIRS@ ${LLVM_INCLUDE_DIRS}) | |
12 set(Polly_LIBRARY_DIRS @POLLY_CONFIG_LIBRARY_DIRS@) | |
13 set(Polly_EXPORTED_TARGETS @POLLY_CONFIG_EXPORTED_TARGETS@) | |
14 set(Polly_LIBRARIES ${LLVM_LIBRARIES} ${Polly_EXPORTED_TARGETS}) | |
15 | |
16 # Imported Targets: | |
17 @ISL_CONFIG_CODE@ | |
18 | |
19 if (Polly_ENABLE_GPGPU_CODEGEN AND NOT TARGET PollyPPCG) | |
20 add_library(PollyPPCG @POLLY_CONFIG_TARGET_PollyPPCG_TYPE@ IMPORTED) | |
21 set_property(TARGET PollyPPCG PROPERTY INTERFACE_LINK_LIBRARIES @ISL_TARGET@) | |
22 endif() | |
23 | |
24 if (NOT TARGET Polly) | |
25 add_library(Polly @POLLY_CONFIG_TARGET_Polly_TYPE@ IMPORTED) | |
26 set_property(TARGET Polly PROPERTY INTERFACE_LINK_LIBRARIES @ISL_TARGET@) | |
27 if (Polly_ENABLE_GPGPU_CODEGEN) | |
28 set_property(TARGET Polly APPEND PROPERTY INTERFACE_LINK_LIBRARIES PollyPPCG) | |
29 endif() | |
30 endif() | |
31 | |
32 if (NOT TARGET LLVMPolly) | |
33 add_library(LLVMPolly @POLLY_CONFIG_TARGET_LLVMPolly_TYPE@ IMPORTED) | |
34 set_property(TARGET LLVMPolly PROPERTY INTERFACE_LINK_LIBRARIES Polly) | |
35 endif() | |
36 | |
37 # Exported locations: | |
38 file(GLOB CONFIG_FILES "${Polly_CMAKE_DIR}/PollyExports-*.cmake") | |
39 foreach(f ${CONFIG_FILES}) | |
40 include(${f}) | |
41 endforeach() |