[CMake] DEBUG/RELEASE configurations for custom targets

Mike Howells mike.howells at smartsgroup.com
Sun Sep 20 20:12:49 EDT 2009


Hi,

I have a custom target that runs cppcheck. How do I specify different
flags for different configurations? For example: I would like to specify
"--all --style" when building DEBUG configuration, but not with RELEASE.

I can see how other built-in targets do this using things like
CXX_FLAGS_DEBUG, and I can see how to use CMAKE_BUILD_TYPE in the case
of a single-configuration generator. But how do you do it with a
multi-configuration generator like the Visual Studio one? 

Mike.




More information about the CMake mailing list