[PATCH] D154212: [cmake] Add LLVM_UNITTEST_LINK_FLAGS option

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 14:21:11 PDT 2023


nikic added inline comments.


================
Comment at: llvm/cmake/modules/AddLLVM.cmake:1613-1614
 
+  set(LLVM_UNITTEST_LINK_FLAGS "" CACHE STRING
+      "Additional linker flags for unit tests")
+  set_property(TARGET ${test_name} APPEND_STRING PROPERTY
----------------
phosek wrote:
> For variables that are intended to be used by users, I'd prefer to keep them in the top-level `CMakeLists.txt` file for easier discoverability.
The reason I put it here is that the option is shared across all subprojects using unit tests, so just putting it in `llvm/CMakeLists.txt` wouldn't work. Maybe HandleLLVMOptions would be the right place to define such a shared option?


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

https://reviews.llvm.org/D154212



More information about the llvm-commits mailing list