summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-11 13:19:05 -0400
committerBrad King <brad.king@kitware.com>2017-08-16 10:13:38 -0400
commitfd4fd9a276126a1b1044d57a064c3b8201a91a33 (patch)
tree4c0868140907e09853e2e65484fcab2beaf1b9cb /CMakeLists.txt
parentc47c011c77bfd1bfb8d2060511a2b957ce181c62 (diff)
downloadcmake-fd4fd9a276126a1b1044d57a064c3b8201a91a33.tar.gz
Require C++11 to build CMake itself
CMake can now compile as C++11 on all supported platforms. Check that std::unique_ptr is available and fail early if missing. This will allow us to use C++11 more broadly in CMake's implementation (previously it was restricted to the serve mode implementation). Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e60dc78164..bebb00007a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,6 +80,10 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
# check for available C++ features
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake)
+
+ if(NOT CMake_HAVE_CXX_UNIQUE_PTR)
+ message(FATAL_ERROR "The C++ compiler does not support C++11 (e.g. std::unique_ptr).")
+ endif()
endif()
# set the internal encoding of CMake to UTF-8