File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,17 @@ set(CMAKE_MACOSX_RPATH TRUE)
3030if (NOT CMAKE_BUILD_TYPE )
3131 set (CMAKE_BUILD_TYPE Debug)
3232endif ()
33+ # normalize build type string
34+ string (TOUPPER "${CMAKE_BUILD_TYPE} " BUILD_TYPE_UPPER)
35+ if ("${BUILD_TYPE_UPPER} " STREQUAL "RELEASE" )
36+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
37+ elseif ("${BUILD_TYPE_UPPER} " STREQUAL "DEBUG" )
38+ set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
39+ elseif ("${BUILD_TYPE_UPPER} " STREQUAL "RELWITHDEBINFO" )
40+ set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build Type" FORCE)
41+ elseif ("${BUILD_TYPE_UPPER} " STREQUAL "RELWITHDEBUG" )
42+ set (CMAKE_BUILD_TYPE "RelWithDebug" CACHE STRING "Build Type" FORCE)
43+ endif ()
3344
3445add_compile_options (-Wall -Wextra -fvisibility=hidden -std=gnu99)
3546set (CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG" )
You can’t perform that action at this time.
0 commit comments