[Cmake] Setting different compiler flags for Debug vs Release bu ilds

Mathews, Rob rmathews at envoyww . com
Tue, 14 Oct 2003 17:26:43 -0400


How do you set different compiler flags for Debug vs Release builds? 

For example, I need to set the "/MTd" (use multithreaded static debug C
runtime library switch) for a debug build and "/MT" compiler flag for a
release build.

I've read through the documentation and examples, but CMAKE_CXX_FLAGS
doesn't seem to support this and I can't find any other magic variables. 

Does CMake support this? 

Rob.