Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Pfaffe <philip.pfaffe@gmail.com>2018-11-06 18:18:17 +0300
committerPhilip Pfaffe <philip.pfaffe@gmail.com>2018-11-06 18:18:17 +0300
commit55d2f5aad54f55af8aa645c872cdf7824ae86d6b (patch)
tree953c4b914f98f355cd7ee50b9ca9197b6f5f53c6 /polly/cmake
parentbb36aea1d5c9fb4ae3870dec5ba3f8aa41d6a9dc (diff)
[CMake] Fix generation of exported targets in build directory
CMake generates the exports file wrongly if the CMAKE_BUILD_TYPE is unset for multi-configuration generators. The generated file lib/cmake/polly/PollyExports-all.cmake then contains: set_target_properties(LLVMPolly PROPERTIES IMPORTED_LOCATION_ my_build_dir/lib/LLVMPolly.so) set_target_properties(Polly PROPERTIES IMPORTED_LOCATION_ my_build_dir/lib/libPolly.a) This patch conditionalizes the underscore. Patch by: Marcin Copik Differential Revision: D53376 llvm-svn: 346231
Diffstat (limited to 'polly/cmake')
-rw-r--r--polly/cmake/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt
index 969292cd6b00..211f95512717 100644
--- a/polly/cmake/CMakeLists.txt
+++ b/polly/cmake/CMakeLists.txt
@@ -60,7 +60,7 @@ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
set(POLLY_EXPORTS
"set_target_properties(${tgt} PROPERTIES
- IMPORTED_LOCATION_$<UPPER_CASE:$<CONFIG>> $<TARGET_FILE:${tgt}>)
+ IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_$<UPPER_CASE:$<CONFIG>>> $<TARGET_FILE:${tgt}>)
${POLLY_EXPORTS}")
endif()
endforeach(tgt)
@@ -111,7 +111,7 @@ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
set(POLLY_EXPORTS
"set_target_properties(${tgt} PROPERTIES
- IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_<UPPER_CASE:$<CONFIG>> \${CMAKE_CURRENT_LIST_DIR}/${tgt_path})
+ IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_$<UPPER_CASE:$<CONFIG>>> \${CMAKE_CURRENT_LIST_DIR}/${tgt_path})
${POLLY_EXPORTS}")
endif()
endforeach(tgt)