> You can set the COMPILE_DEFINITIONS_DEBUG property on individual targets using SET_TARGET_PROPERTIES() or on directories with SET_DIRECTORY_PROPERTIES. > Thanks, this is what I need. A minor improvement to cmake can be done here: if I define _DEBUG for the debug configuration, then for visual studio _DEBUG gets defined twice.