Remove the DEBUG option of CMake, that was overriding CMAKE_BUILD_TYPE

CMAKE_BUILD_TYPE is the expected way of specifying a Debug/Release build.
This commit is contained in:
Johann Dreo 2013-04-29 16:03:58 +02:00
commit 768b08c8d7

View file

@ -31,11 +31,11 @@ endif()
### 0) Define general CXX flags for DEBUG and RELEASE ### 0) Define general CXX flags for DEBUG and RELEASE
###################################################################################### ######################################################################################
if(DEBUG) #if(DEBUG)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE) # set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
else(DEBUG) #else(DEBUG)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) # set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif(DEBUG) #endif(DEBUG)
add_definitions(-DDEPRECATED_MESSAGES) add_definitions(-DDEPRECATED_MESSAGES)
set(CMAKE_CXX_FLAGS_DEBUG "-Wunknown-pragmas -O0 -g -Wall -Wextra -ansi -pedantic" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-Wunknown-pragmas -O0 -g -Wall -Wextra -ansi -pedantic" CACHE STRING "" FORCE)