My cmake-based legacy C++ code base contains some specific preprocessor debug macro - let his name be DEBUG_ATTRIBUTE
- responsible for certain types of debug output. Despite his name, the macro shouldn't be turned on for a standard debug build. For some reason, also all the CMakeLists.txt etc. have to be let alone.
What would be the best way to set the define from cmake's command line, depending on the build-type 'Debug' (cmake creates a Visual Studio 2010 solution)? Can I use generator expressions for this (I suspect, they don't work because of their defining traits)?