mirror of https://github.com/davisking/dlib.git
Improved check for old visual studio
This commit is contained in:
parent
0eb92bbe41
commit
ac2d2a787b
|
@ -18,6 +18,9 @@ set(COMPILER_CAN_DO_CPP_11 0)
|
|||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/add_global_compiler_switch.cmake)
|
||||
|
||||
if(MSVC AND MSVC_VERSION VERSION_LESS 1900)
|
||||
message(FATAL_ERROR "C++11 is required to use dlib, but the version of Visual Studio you are using is too old and doesn't support C++11. You need Visual Studio 2015 or newer. ")
|
||||
endif()
|
||||
|
||||
# Now turn on the appropriate compiler switch to enable C++11 if you have a
|
||||
# C++11 compiler. In CMake 3.1 there is a simple flag you can set, but earlier
|
||||
|
@ -50,8 +53,6 @@ if (CMAKE_VERSION VERSION_LESS "3.1.2")
|
|||
message(FATAL_ERROR "*** Your compiler failed to build a C++11 project, so dlib won't use C++11 features.***")
|
||||
endif()
|
||||
endif()
|
||||
elseif(MSVC AND MSVC_VERSION VERSION_LESS 1900)
|
||||
message(FATAL_ERROR "C++11 is required to use dlib, but the version of Visual Studio you are using is too old and doesn't support C++11.")
|
||||
elseif(MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.24215.1 )
|
||||
message(STATUS "NOTE: Visual Studio didn't have good enough C++11 support until Visual Studio 2015 update 3 (v19.0.24215.1)")
|
||||
message(STATUS "So we aren't enabling things that require full C++11 support (e.g. the deep learning tools).")
|
||||
|
|
Loading…
Reference in New Issue