On Sun, Sep 20, 2009 at 07:12:49PM -0500, Mike Howells wrote: > 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?
Take a look at CMAKE_CFG_INTDIR. VS will interpolate $(OutDir) when it runs your custom command. tyler _______________________________________________ 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
