diff --git a/CMakeLists.txt b/CMakeLists.txt index df8b5367..60efee57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved. -cmake_minimum_required( VERSION 2.8.10 ) +cmake_minimum_required (VERSION 3.5) project( restbed CXX ) set( restbed_VERSION_MAJOR 4 ) diff --git a/cmake/configuration.cmake b/cmake/configuration.cmake index 9ed1e875..5f21c418 100644 --- a/cmake/configuration.cmake +++ b/cmake/configuration.cmake @@ -33,6 +33,12 @@ elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang ) else ( ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) endif ( ) +elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang ) + if ( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.3 ) + message( FATAL_ERROR "\nAppleClang version < 3.3\nYour systems default compiler is AppleClang. This project makes use of c++11 features present only in versions of clang >= 3.3. You can use a different compiler by re-running cmake with the command switch \"-D CMAKE_CXX_COMPILER=\" " ) + else ( ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) + endif ( ) elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC ) if ( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 19.00.23026.0 ) message( WARNING "\nMSVC compiler version < 19.00.23026.0" )