[cmake-developers] add_compile_options and link flags

Brad King brad.king at kitware.com
Mon Jun 9 11:46:17 EDT 2014


On 06/09/2014 11:40 AM, Ben Boeckel wrote:
> 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?

See thread here:

 push of LinkOptionsCommand topic branch
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9203

IIRC there were a couple of minor unresolved issues but it is mostly
just waiting for someone to have time to take it to completion.

-Brad




More information about the cmake-developers mailing list