It seems different generators are handling this differently, which is frustrating (I've tried with both CMake 3.1.0 and 2.8.12.2)... or else there's something very bizarre about my cmake files.
The new doc layout looks nice, but it really needs an infusion of detail. Here's the doc for CMAKE_CXX_FLAGS: http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_LANG_FLAGS.html which isn't so helpful for my question :-). If I'm on OSX, then when I set CMAKE_CXX_FLAGS and do not set CMAKE_EXE_LINKER_FLAGS, for example, and I use the Xcode generator, then I see: * CMAKE_CXX_FLAGS show up on the compilation line * CMAKE_CXX_FLAGS do NOT show up in the linker line On the other hand if I'm on OSX and I use the Unix Makefiles generator, then I see: * CMAKE_CXX_FLAGS show up on the compilation line * CMAKE_CXX_FLAGS ALSO show up in the linker line I assume the Xcode output is correct and the makefile output (with CMAKE_CXX_FLAGS in both) is not correct... but there's nothing I can find in the docs that says this explicitly. I've printed the contents of the CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS at the end of my CMakeLists.txt and they're just what I expect. It's just that the link line has extra flags, when invoked from make. Can anyone else reproduce this? -- 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