summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-08-18 18:57:40 +0100
committerPeter Powell <petpow@saberuk.com>2015-12-31 02:51:59 +0000
commit71c2a0a675c7767ff69cc243849da7eb64fe88d7 (patch)
tree4fba1a0cde055a6aa4ca131ef823f3a587f1f048 /CMakeLists.txt
parent6a0975370a74795ce3e0671849b98201d17228c0 (diff)
Clean up CMake includes.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 5 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b7f59d79..a0d38c5ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,10 @@ enable_language(C)
# Override the module include path to include our directory, for our Anope.cmake, as well as we are using our own version of the NSIS template
list(APPEND CMAKE_MODULE_PATH "${Anope_SOURCE_DIR}/cmake")
-include(Anope)
+include("Anope")
+include("CheckFunctionExists")
+include("CheckLibraryExists")
+include("CheckCXXCompilerFlag")
# Force the locale to C for later uses of things like gcc so the messages come up in English, not the user's default language
set(ENV{LC_ALL} C)
@@ -31,16 +34,7 @@ if(NOT MSVC)
else()
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
endif()
-endif()
-
-# Include the checking functions used later in this CMakeLists.txt
-include(CheckFunctionExists)
-include(CheckIncludeFile)
-include(CheckTypeSize)
-include(CheckLibraryExists)
-include(CheckCXXCompilerFlag)
-
-if(NOT MSVC)
+
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(NOT COMPILER_SUPPORTS_CXX11)
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a newer compiler.")