MantisBT - CMake
View Issue Details
0015940CMakeCMakepublic2016-01-28 18:322016-06-10 14:31
Guy Harris 
Kitware Robot 
normalminorN/A
closedmoved 
CMake 2.8.12.2 
 
0015940: There doesn't appear to be a cross-platform way to set flags to be used at compile time but not at link time
It appears that if a flag is added to CMAKE_C_FLAGS, it will be used not only at compile time but also at link time, at least for some platform/compiler combinations.

Many such flags are, at best, not helpful at link time, and clutter the command line used for linking. Some might also not work at link time.

Unix make, and autotools, keep compiler flags (CFLAGS/CXXFLAGS/etc.) and linker flags (LDFLAGS) separate. CMake should provide a way to do the same.
No tags attached.
Issue History
2016-01-28 18:32Guy HarrisNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042925
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042925)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.