[cmake-developers] add_compile_options and link flags

Ben Boeckel ben.boeckel at kitware.com
Mon Jun 9 11:40:00 EDT 2014


Hi,

So add_compile_options exists now, but is still not a 100% replacement
for CMAKE_CXX_FLAGS_${config} because the flags are only used for the
.c -> .o step and not for linking. Some flags need to be passed to the
linker as well (in my case, profiling flags, but I imagine other tooling
flags, standards, and probably LTO need to be passed consistently). Are
there plans for an add_link_options (or add_link_flags) command as well?

Thanks,

--Ben


More information about the cmake-developers mailing list