[CMake] per-configuration defines
Michele Bosi
michele.bosi at gmail.com
Wed Dec 10 03:13:29 EST 2008
Hi all,
is there a way to issue extra preprocessor defines on a
build-configuration basis, that is: I would like to add some
preprocessor defines to my release builds and others to my debug
builds. Basically I would need something like:
add_definitions_release(-DDEFINE1 -DDEFINE2)
add_definitions_debug(-DDEFINE3 -DDEFINE4)
I know that I could also do it using the target properties like:
SET_TARGET_PROPERTIES(target PROPERTIES
COMPILE_DEFINITIONS_<CONFIG> "-DDEFINEn") but since I
have several targets spread all over the world it would be nice to be
able to add such defines once and for all :)
Regards,
Michele
More information about the CMake
mailing list