[PATCH] D93987: [ASTMatchers] Fix build when no targets are enabled

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 10:09:21 PST 2021


aaron.ballman added inline comments.


================
Comment at: llvm/cmake/modules/LLVM-Config.cmake:31
     set(omitted_targets ${LLVM_ALL_TARGETS})
-    list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
+    if (LLVM_TARGETS_TO_BUILD)
+      list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
----------------
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?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93987/new/

https://reviews.llvm.org/D93987



More information about the llvm-commits mailing list