This makes sense to do when building only tools like clang-tidy for
example.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/cmake/modules/LLVM-Config.cmake | ||
---|---|---|
31–33 | I'm not a CMake expert, so can you explain what effect this change has? From the documentation (and my own limited understanding of cmake), I would have expected this to be a noop -- if the list of elements is empty, nothing will get removed from omitted_targets, right? |
llvm/cmake/modules/LLVM-Config.cmake | ||
---|---|---|
31–33 | You can reproduce the issue in a small testcase with this file: set(omitted_targets one two three) # Comment this to reproduce the failure set(LLVM_TARGETS_TO_BUILD X86) list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD}) Run this after commenting the line: $ cmake -P cmaketest.cmake CMake Error at cmaketest.cmake:6 (list): list sub-command REMOVE_ITEM requires two or more arguments. |
Comment Actions
LGTM
llvm/cmake/modules/LLVM-Config.cmake | ||
---|---|---|
31–33 | Huh, wow, how unintuitive! Thank you for the explanation. |
llvm/cmake/modules/LLVM-Config.cmake | ||
---|---|---|
31–33 | Yes, I've filed https://gitlab.kitware.com/cmake/cmake/-/issues/21663 |
I'm not a CMake expert, so can you explain what effect this change has? From the documentation (and my own limited understanding of cmake), I would have expected this to be a noop -- if the list of elements is empty, nothing will get removed from omitted_targets, right?