summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-10 15:37:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-10 19:08:02 (GMT)
commitfb0c3c564c6623750964bbbf6db602e089c2ecc4 (patch)
tree19f1f4177d8e6ec354d61c5fd70915297a93567b
parent88c9878af9d6d4b8cd3c7358bfdd12206c8aadb4 (diff)
downloadCMake-fb0c3c564c6623750964bbbf6db602e089c2ecc4.zip
CMake-fb0c3c564c6623750964bbbf6db602e089c2ecc4.tar.gz
CMake-fb0c3c564c6623750964bbbf6db602e089c2ecc4.tar.bz2
Require CMake 3.1 to build CMake itself
This simplifies some policy settings and use of third-party libraries with imported targets.
-rw-r--r--CMakeLists.txt26
-rw-r--r--Utilities/Doxygen/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt2
3 files changed, 6 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e60dc78..30b6da9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
-if(POLICY CMP0025)
- cmake_policy(SET CMP0025 NEW)
-endif()
-if(POLICY CMP0053)
- cmake_policy(SET CMP0053 NEW)
-endif()
+cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(CMake)
# Make sure we can find internal find_package modules only used for
@@ -341,11 +335,7 @@ macro (CMAKE_BUILD_UTILITIES)
endif()
if(CMAKE_USE_SYSTEM_LIBRHASH)
- if(NOT CMAKE_VERSION VERSION_LESS 3.0)
- find_package(LibRHash)
- else()
- message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBRHASH requires CMake >= 3.0")
- endif()
+ find_package(LibRHash)
if(NOT LibRHash_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_LIBRHASH is ON but LibRHash is not found!")
@@ -511,11 +501,7 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build jsoncpp library.
if(CMAKE_USE_SYSTEM_JSONCPP)
- if(NOT CMAKE_VERSION VERSION_LESS 3.0)
- find_package(JsonCpp)
- else()
- message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
- endif()
+ find_package(JsonCpp)
if(NOT JsonCpp_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
@@ -530,11 +516,7 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build libuv library.
if(CMAKE_USE_SYSTEM_LIBUV)
- if(NOT CMAKE_VERSION VERSION_LESS 3.0)
- find_package(LibUV 1.0.0)
- else()
- message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0")
- endif()
+ find_package(LibUV 1.0.0)
if(NOT LIBUV_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index f1e8f95..6a90c84 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeDeveloperReference_STANDALONE 1)
- cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index a29380c..2de821c 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeHelp_STANDALONE 1)
- cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)