(issue corresponding to review suggestion here)
CMAKE_CXX_FLAGS is used to configure compiler warnings in cmake as part of the testing procedure, (following the this advice). I am not aware of a warning API in cmake and I know of no option that does not involve passing explicit flags to the compiler. So, AFAIU, better options to configure compiler warnings would still require explicit flags.
With that in mind, I see 2 contending alternatives to the current approach:
- use
target_compile_options on each target
- use
add_compile_options once
To be discussed. Suggestions of better options are welcome.
(issue corresponding to review suggestion here)
CMAKE_CXX_FLAGSis used to configure compiler warnings in cmake as part of the testing procedure, (following the this advice). I am not aware of a warning API in cmake and I know of no option that does not involve passing explicit flags to the compiler. So, AFAIU, better options to configure compiler warnings would still require explicit flags.With that in mind, I see 2 contending alternatives to the current approach:
target_compile_optionson each targetadd_compile_optionsonceTo be discussed. Suggestions of better options are welcome.