Improve CMAKE_BUILD_TYPE handling

This commit is contained in:
Fabian Wolff 2016-03-13 15:08:25 +01:00
parent 2592e50f83
commit c474903549

View File

@ -16,8 +16,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(SQ_FLAGS ${SQ_FLAGS} -O3)
else()
set(SQ_FLAGS ${SQ_FLAGS} -pg -pie -gstabs -g3)
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(SQ_FLAGS ${SQ_FLAGS} -O3 -g)
elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set(SQ_FLAGS ${SQ_FLAGS} -Os)
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(SQ_FLAGS ${SQ_FLAGS} -pg -pie -gstabs -g3 -Og)
endif()
if(CMAKE_VERSION VERSION_GREATER 3)