What is considered best practice for (re)defining build-type compiler options for a project, especially one that may find itself as a subproject of something larger?
To be concrete, say for Debug I want the project to use a set of warn/check options. Should I set (or add to) CMAKE_C_FLAGS_DEBUG, and if so should I use the CACHE FORCE options to get it into the cache? (I don't have a good feel for the implications.) Or is it better to append to CMAKE_C_FLAGS? I observe that the value of the latter precedes the value of the build-type variables on the compile line, and so it can't override those defaults. Or is some other way best? Also, say there was a compiler flag that was absolutely required. Where to add it so that it didn't get overridden by anything coming in through either CMAKE_C_FLAGS or the build-type specific variables? Thanks
-- 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