summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-04-26 12:18:39 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-04-28 08:53:36 +0200
commitb07a6f45fe78dcc2f40e1e980a8ab712416e08cd (patch)
tree21c1f67b9c0a32bb92019bc65ea207dd5a664752
parent91599701d07a9efb02a2f27d17a8f95bc2b9accf (diff)
downloadmariadb-git-b07a6f45fe78dcc2f40e1e980a8ab712416e08cd.tar.gz
MDEV-25232 - CMake deprecation warning about CMAKE_MINIMUM_REQUIRED < 2.8.12
-rw-r--r--CMakeLists.txt27
-rw-r--r--storage/mroonga/CMakeLists.txt2
2 files changed, 14 insertions, 15 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")
diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt
index 9af111baf56..317c337e247 100644
--- a/storage/mroonga/CMakeLists.txt
+++ b/storage/mroonga/CMakeLists.txt
@@ -17,7 +17,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8.12)
project(mroonga)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")