[PATCH] D81762: [CMake] Fix incorrect handling of get_target_property failure
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 12:29:03 PDT 2020
ctetreau marked an inline comment as done.
ctetreau added inline comments.
================
Comment at: llvm/cmake/modules/AddLLVM.cmake:1431
get_target_property(test_suite_folder ${test_suite} FOLDER)
- if (NOT ${test_suite_folder} STREQUAL "NOTFOUND")
+ if (NOT ${test_suite_folder} STREQUAL "test_suite_folder-NOTFOUND")
set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
----------------
serge-sans-paille wrote:
> If I understand https://cmake.org/cmake/help/latest/command/if.html correctly,
>
> ```
> if(test_suite_folder)
> ```
>
> should work too. Can you test that?
I had originally put `if(${test_suite_folder})`, but it looks like the CMake language treats the string in the if as a variable and dereferences it instead of just checking to see if it's truthy.
Your version works just fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81762/new/
https://reviews.llvm.org/D81762
More information about the llvm-commits
mailing list