CMakeLists.txt: define DEBUG=1 only when CMAKE_BUILD_TYPE=Debug
authorAntonio Ospite <ospite@studenti.unina.it>
Wed, 30 Oct 2013 09:41:06 +0000 (10:41 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Wed, 30 Oct 2013 09:41:06 +0000 (10:41 +0100)
commitf3b176f27268e13942f452e915171b9c8b34f6ce
tree3c420064c4caf46751e4516870b6f5557e69d36e
parentf0d81ee8d2cdfc6102e0f401e89a44edc8e7b6dc
CMakeLists.txt: define DEBUG=1 only when CMAKE_BUILD_TYPE=Debug

When building with CMAKE_BUILD_TYPE=RelWithDebInfo the development debug
code should not be enabled, so don't define DEBUG=1 in DEBUG_FLAGS as
this will end up being both in CMAKE_C_FLAGS_DEBUG and
CMAKE_C_FLAGS_RELWITHDEBINFO.

Instead define DEBUG=1 only for CMAKE_C_FLAGS_DEBUG so it gets used only
when CMAKE_BUILD_TYPE=Debug.
CMakeLists.txt