diff options
author | Brad King <brad.king@kitware.com> | 2017-08-11 17:19:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-16 14:13:38 (GMT) |
commit | fd4fd9a276126a1b1044d57a064c3b8201a91a33 (patch) | |
tree | 4c0868140907e09853e2e65484fcab2beaf1b9cb /CMakeLists.txt | |
parent | c47c011c77bfd1bfb8d2060511a2b957ce181c62 (diff) | |
download | CMake-fd4fd9a276126a1b1044d57a064c3b8201a91a33.zip CMake-fd4fd9a276126a1b1044d57a064c3b8201a91a33.tar.gz CMake-fd4fd9a276126a1b1044d57a064c3b8201a91a33.tar.bz2 |
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.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e60dc78..bebb000 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 |