[PATCH] D81762: [CMake] Fix incorrect handling of get_target_property failure
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 13:14:05 PDT 2020
ctetreau created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
add_unittest was checking that the result of get_target_property was not
"NOTFOUND", but despite what the documentation says, get_target_property
returns <the var>-NOTFOUND on failure.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81762
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -1422,7 +1422,7 @@
add_dependencies(${test_suite} ${test_name})
get_target_property(test_suite_folder ${test_suite} FOLDER)
- if (NOT ${test_suite_folder} STREQUAL "NOTFOUND")
+ if (${test_suite_folder})
set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
endif ()
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81762.270505.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200612/48ad4724/attachment.bin>
More information about the llvm-commits
mailing list