Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 55d2f5a

Browse files
committedNov 6, 2018
[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
1 parent bb36aea commit 55d2f5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎polly/cmake/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
6060
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
6161
set(POLLY_EXPORTS
6262
"set_target_properties(${tgt} PROPERTIES
63-
IMPORTED_LOCATION_$<UPPER_CASE:$<CONFIG>> $<TARGET_FILE:${tgt}>)
63+
IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_$<UPPER_CASE:$<CONFIG>>> $<TARGET_FILE:${tgt}>)
6464
${POLLY_EXPORTS}")
6565
endif()
6666
endforeach(tgt)
@@ -111,7 +111,7 @@ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
111111
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
112112
set(POLLY_EXPORTS
113113
"set_target_properties(${tgt} PROPERTIES
114-
IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_<UPPER_CASE:$<CONFIG>> \${CMAKE_CURRENT_LIST_DIR}/${tgt_path})
114+
IMPORTED_LOCATION$<$<NOT:$<CONFIG:>>:_$<UPPER_CASE:$<CONFIG>>> \${CMAKE_CURRENT_LIST_DIR}/${tgt_path})
115115
${POLLY_EXPORTS}")
116116
endif()
117117
endforeach(tgt)

0 commit comments

Comments
 (0)
Please sign in to comment.