Michael Wild <them...@gmail.com> writes: > On 03/14/2011 12:42 AM, Óscar Fuentes wrote: >> There are target properties such as LINK_FLAGS and LINK_FLAGS_<CONFIG>, >> but I don't see properties for setting compiler flags. This makes >> impossible to build two targets on the same CMakeLists.txt with >> different compiler flags (I was told that the last value of >> CMAKE_<LANG>_FLAGS_<CONFIG> applies to all targets on that >> CMakeLists.txt). >> >> So why no per-target compile flags? > > You could misuse COMPILE_DEFINITIONS and COMPILE_DEFINITIONS_<CONFIG> > for that...
I think that that is the same case as COMPILE_FLAGS property: it just adds its contents to whatever CMAKE_*_FLAGS* has. I'm afraid of compiler errors & warnings of the sort of "option -foo is incompatible with option -bar" So as it seems that there is no way of replacing the compiler flags at the target level, is it an omission worth a bug report or is it something that was decided? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake