diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-04-26 12:18:39 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-04-28 08:53:36 +0200 |
commit | b07a6f45fe78dcc2f40e1e980a8ab712416e08cd (patch) | |
tree | 21c1f67b9c0a32bb92019bc65ea207dd5a664752 /CMakeLists.txt | |
parent | 91599701d07a9efb02a2f27d17a8f95bc2b9accf (diff) | |
download | mariadb-git-b07a6f45fe78dcc2f40e1e980a8ab712416e08cd.tar.gz |
MDEV-25232 - CMake deprecation warning about CMAKE_MINIMUM_REQUIRED < 2.8.12
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3decb4bac67..866792967d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) +PROJECT(MySQL) # explicitly set the policy to OLD # (cannot use NEW, not everyone is on cmake-2.8.12 yet) @@ -53,8 +54,16 @@ IF(NOT DEFINED MANUFACTURER) MARK_AS_ADVANCED(MANUFACTURER) ENDIF() -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") +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) @@ -83,18 +92,8 @@ IF(UNIX AND NOT APPLE) MARK_AS_ADVANCED(WITH_PIC) ENDIF() -# Optionally set project name, e.g. -# foo.xcodeproj (mac) or foo.sln (windows) +# This is used by TokuDB only SET(MYSQL_PROJECT_NAME_DOCSTRING "MySQL project name") -IF(DEFINED MYSQL_PROJECT_NAME) - SET(MYSQL_PROJECT_NAME ${MYSQL_PROJECT_NAME} CACHE STRING - ${MYSQL_PROJECT_NAME_DOCSTRING} FORCE) -ELSE() - SET(MYSQL_PROJECT_NAME "MySQL" CACHE STRING - ${MYSQL_PROJECT_NAME_DOCSTRING} FORCE) - MARK_AS_ADVANCED(MYSQL_PROJECT_NAME) -ENDIF() -PROJECT(${MYSQL_PROJECT_NAME}) SET(CPACK_PACKAGE_NAME "MariaDB") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server") |