28 lines
786 B
Plaintext
28 lines
786 B
Plaintext
# Define options for compiling:
|
|
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS None Release Debug RelWithDebInfo)
|
|
IF(NOT CMAKE_BUILD_TYPE)
|
|
SET(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
|
|
ENDIF()
|
|
IF(NOT DEFINED COMPILE_POSTFIX)
|
|
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} Debug EQ)
|
|
IF(NOT EQ)
|
|
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} RelWithDebInfo EQ)
|
|
ENDIF()
|
|
IF(EQ)
|
|
SET(COMPILE_POSTFIX "_d")
|
|
ELSEIF()
|
|
SET(COMPILE_POSTFIX "")
|
|
ENDIF()
|
|
ENDIF()
|
|
|
|
IF(NOT DEFINED LAST_BUILD_TYPE)
|
|
SET(LAST_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE INTERNAL "")
|
|
ENDIF()
|
|
|
|
STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} ${LAST_BUILD_TYPE} EQ)
|
|
IF(NOT EQ)
|
|
SET(BUILD_TYPE_CHANGED TRUE)
|
|
SET(LAST_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE INTERNAL "")
|
|
ENDIF()
|
|
|