[PATCH] D142363: [cmake] Stop using add_definitions
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 07:37:54 PST 2023
barannikov88 accepted this revision.
barannikov88 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:71
- # `add_definitions` does not support generator expressions.
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-UNDEBUG>)
if (MSVC)
----------------
I wonder if `remove_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:NDEBUG>)` works?
It seems it is able to remove previously added DDEBUG from the command line, but otherwise does not pass "-UNDEBUG" to the compiler.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142363/new/
https://reviews.llvm.org/D142363
More information about the llvm-commits
mailing list