Conditional Compilation Without Source Clutter Using CMake Generator Expressions
CMake generator expressions keep platform- and configuration-specific compiler flags in the build system instead of #ifdef blocks in source, with a worked target_compile_options example and a compile_commands.json check.