[PATCH] D142363: [cmake] Stop using add_definitions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 07:39:36 PST 2023
foad added inline comments.
================
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)
----------------
barannikov88 wrote:
> 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.
>
Interesting. I did not know about remove_definitions. But I'd prefer not to do that in this patch, since I have already tested it as-is.
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