[cmake-developers] CXX_STANDARD and linking

Ben Boeckel ben.boeckel at kitware.com
Tue Oct 6 14:37:32 EDT 2015


On Sun, Oct 04, 2015 at 16:47:40 +0200, Stephen Kelly wrote:
> The existing CMake feature deals with compilation, but does not deal with 
> linking. 

A generic target_link_options() is necessary for other things as well,
such as:

  * -fsanitize=address needs to be passed to the linker to add -lasan
    (similar for other sanitizers);
  * -pg -ftest-coverage -fprofile-arcs needs to be passed to the
    linker for adding profiling information.

--Ben


More information about the cmake-developers mailing list