Skip to content

Commit ac30586

Browse files
crazyhappygameminggo
authored andcommitted
Support multiple build configurations (#20314)
* MINSIZEREL_RELWITHDEBINFO_Support * Remove DEBUG_MODE
1 parent 4d16f31 commit ac30586

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

cmake/Modules/CocosBuildSet.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ message(STATUS "CMAKE_MODULE_PATH:" ${CMAKE_MODULE_PATH})
2222
message(STATUS "PROJECT_BINARY_DIR:" ${PROJECT_BINARY_DIR})
2323
message(STATUS "ENGINE_BINARY_PATH:" ${ENGINE_BINARY_PATH})
2424

25-
# the default behavior of build module
26-
option(DEBUG_MODE "Debug or Release?" ON)
25+
2726
option(BUILD_LUA_LIBS "Build lua libraries" OFF)
2827

2928
# include helper functions

cmake/Modules/CocosConfigDefine.cmake

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,6 @@ elseif(CMAKE_GENERATOR MATCHES Visual)
4545
endif()
4646
message(STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
4747

48-
if(CMAKE_CONFIGURATION_TYPES)
49-
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Reset the configurations to what we need" FORCE)
50-
message(STATUS "CMAKE_CONFIGURATION_TYPES: ${CMAKE_CONFIGURATION_TYPES}")
51-
else()
52-
if(NOT CMAKE_BUILD_TYPE)
53-
if(DEBUG_MODE) # build mode, Debug is default value
54-
set(CMAKE_BUILD_TYPE Debug)
55-
else()
56-
set(CMAKE_BUILD_TYPE Release)
57-
endif()
58-
endif()
59-
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
60-
endif()
61-
6248
# custom target property for lua/js link
6349
define_property(TARGET
6450
PROPERTY CC_JS_DEPEND

0 commit comments

Comments
 (0)