[PATCH] D53376: Fix generation of exported targets in build directory
Marcin Copik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 05:35:27 PDT 2018
mcopik added a comment.
In https://reviews.llvm.org/D53376#1270537, @philip.pfaffe wrote:
> The fix looks alright, but did you test it with CMAKE_BUILD_TYPE set though? It's hard to parse with the naked eye, but it looks like you're missing at least a $ there.
I took this code directly from line 114 where it is defined for install target. But you were correct, this code is not correct. It's missing a `$` in front of `UPPER_CASE` and it's missing a `>` in the end. Otherwise the main condition "print if config not empty" is not interpreted as a boolean generator expression. I fixed the patch and uploaded a new one.
That's the new output for `CMAKE_BUILD_TYPE` set to Release:
build directory:
set_target_properties(LLVMPolly PROPERTIES
IMPORTED_LOCATION_RELEASE build_dir/lib/LLVMPolly.so)
set_target_properties(Polly PROPERTIES
IMPORTED_LOCATION_RELEASE build_dir/lib/libPolly.a)
install directory:
set_target_properties(LLVMPolly PROPERTIES
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_LIST_DIR}/../../LLVMPolly.so)
set_target_properties(Polly PROPERTIES
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_LIST_DIR}/../../libPolly.a)
Before it was:
set_target_properties(LLVMPolly PROPERTIES
IMPORTED_LOCATION_<UPPER_CASE:Release ${CMAKE_CURRENT_LIST_DIR}/../../LLVMPolly.so)
set_target_properties(Polly PROPERTIES
IMPORTED_LOCATION_<UPPER_CASE:Release ${CMAKE_CURRENT_LIST_DIR}/../../libPolly.a)
Names are generated correctly for an empty build type as well.
https://reviews.llvm.org/D53376
More information about the llvm-commits
mailing list