Changes between Initial Version and Version 1 of Ticket #49108, comment 2


Ignore:
Timestamp:
Oct 6, 2015, 10:45:20 AM (9 years ago)
Author:
RJVB (René Bertin)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49108, comment 2

    initial v1  
    33Building with CMAKE_BUILD_TYPE=Release will set the compiler flags to a set decided upon by CMake. Options passed through configure.optflags (as well as those set by base) are not (always) completely ignored but they are not the only options passed on. That is not to claim that the options used currently in standard cmake builds are wildly different from what MacPorts wants them to be...
    44
    5 I have to admit that I have never really understood how those preset flags interact with attempts to set them via CFLAGS, CXXFLAGS etc. and that is partly because KDE4's cmake files override cmake's presets. I do know that when building KDE4 applications, user-specified options from CXXFLAGS are PREpended to the preset options, which means for instance that `-O2` specified by the user will be overridden by the preset `-O3` for the Release build type (or -O3 overridden by -O2, you get the drift).
     5I have to admit that I have never really figured out how those preset flags interact with attempts to set them via CFLAGS, CXXFLAGS etc. and that is partly because KDE4's cmake files override cmake's presets. I do know that when building KDE4 applications, user-specified options from CXXFLAGS are PREpended to the preset options, which means for instance that `-O2` specified by the user will be overridden by the preset `-O3` for the Release build type (or -O3 overridden by -O2, you get the drift).
    66
    77It is of course possible to override the presets on the command line (at least I think so), but you'd have to set all CMAKE_*FLAGS_* variables.