This seems to work:
I couldn't find a variant that would work with add_compile_options(), (though there may well be one) and target_compile_options isn't a direct 1:1 replacement for add_compile_options().
Code:
target_compile_options(my_executable PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wall -Werror -Wno-implicit-function-declaration>)
Statistics: Posted by arg001 — Sat Dec 14, 2024 2:47 pm