[cmake-developers] Starting new project with no build flags set
Brad King
brad.king at kitware.com
Fri Nov 4 10:49:49 EDT 2016
On 11/04/2016 09:02 AM, Robert Goulet wrote:
> What is the clean way to start a new project with no build flags at all.
> i.e. CMAKE_C_FLAGS, CMAKE_C_FLAGS_DEBUG, etc. all set to no value?
> Is there a way to force this for all platforms/compilers? Thanks!
There is a hook just before the flags are initialized in the cache that
gives project code a chance to change the initializers. See
https://cmake.org/cmake/help/v3.7/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.html
There is also a per-language CMAKE_USER_MAKE_RULES_OVERRIDE_{C,CXX} version.
-Brad
More information about the cmake-developers
mailing list