#ifdef DEBUG mit CMake unabhängig von der Plattform

Ich bin mit CMake für den Aufbau meiner Projekte auf Windows (Visual Studio) als auch auf Linux-Maschinen(gcc). Ich möchte mark etwas code "Debuggen", wie mit

#ifdef DEBUG
//some logging here
#endif

Die Frage ist: welchen compiler definition ist auf allen Plattformen verfügbar, die in der CMake "Debug" - build geben? DEBUG scheint nicht zu existieren. (Ich will das logging oder was auch immer nur, wenn das build-Typ "Debug" aus.)

InformationsquelleAutor der Frage Philipp | 2011-12-21

Schreibe einen Kommentar