MDEV-25232 Ninja MSVC build sets default CMAKE_BUILD_TYPE to Debug
This is incosistent with other single config generators, where the default type has always been RelWithDebInfo. Fixed by moving setting of CMAKE_BUILD_TYPE right before PROJECT.
This commit is contained in:
parent
e1bf1aea5c
commit
d0785f7731
@ -15,6 +15,18 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
# Setting build type to RelWithDebInfo as none was specified.
|
||||
# Must occur before PROJECT
|
||||
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel"
|
||||
FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
PROJECT(MySQL)
|
||||
|
||||
# explicitly set the policy to OLD
|
||||
@ -54,17 +66,6 @@ IF(NOT DEFINED MANUFACTURER)
|
||||
MARK_AS_ADVANCED(MANUFACTURER)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
# Setting build type to RelWithDebInfo as none was specified.")
|
||||
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel"
|
||||
FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# MAX_INDEXES - Set the maximum number of indexes per table, default 64
|
||||
IF (NOT MAX_INDEXES)
|
||||
SET(MAX_INDEXES 64)
|
||||
|
Loading…
x
Reference in New Issue
Block a user