MantisBT - CMake
View Issue Details
0015127CMakeCMakepublic2014-09-03 11:082015-03-02 08:57
RenĂ© J.V. Bertin 
 
normaltweakalways
closedsuspended 
Macintosh (main)OS X / Linux10.6.8
CMake 3.0 
 
0015127: command line CXX_FLAG settings overridden by settings in system-wide .cmake files
KDE defines a number of compiler options that are (supposedly) required but that include optimisation options. These settings are defined in system-wide .cmake files like FindKDE4Internal.cmake and get applied *after* user-specified settings have been applied. They even seem to override tweaks made directly in CMakeCache.txt (to CMAKE_CXX_FLAGS_RELEASE or _RELWITHDEBINFO).
Even if user-specified compiler flags do make it to the list in the generated *.make files, the KDE/system-defined options are *appended* to the list, causing -O2 to override -O3 or -g -g3.

Is it possible to specify the KDE/system options in such a way that they appear at the start of the options list in the *.make files?
N/A
Not really a bug, more a question and possibly a feature request.
No tags attached.
Issue History
2014-09-03 11:08René J.V. BertinNew Issue
2014-09-03 11:10Brad KingNote Added: 0036720
2014-09-03 11:11Brad KingStatusnew => resolved
2014-09-03 11:11Brad KingResolutionopen => suspended
2015-03-02 08:57Robert MaynardNote Added: 0038103
2015-03-02 08:57Robert MaynardStatusresolved => closed

Notes
(0036720)
Brad King   
2014-09-03 11:10   
FYI, questions like this are better raised on the mailing list:

 http://www.cmake.org/mailman/listinfo/cmake [^]

In this case you could even consider going to a KDE mailing list because IIUC it is their code that chooses to add the flags after the user value instead of before.
(0038103)
Robert Maynard   
2015-03-02 08:57   
Closing resolved issues that have not been updated in more than 4 months.