I was referred here from http://public.kitware.com/Bug/view.php?id=15127 ... so here goes:
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? With user-defined I mean specified on the commandline, through the environment, or (even) by editing CMakeCache.txt . I raised an issue about this on bugs.kde.org, but it could be constructive to be able to propose a solution/alternative (and I guess the real experts are here, not on kde.org ;) ). Regards, René Bertin -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake