diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index fd266f84a..96a1db673 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -58,11 +58,6 @@ if(has_parent) endif() endif() -# As of dlib 19.22, GCC 4.8.5 is no longer supported, building will fail, so let users know. -if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 4.8.5) - message(FATAL_ERROR "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_VERSION} is too old for dlib ${VERSION}.\n\ - Either update your compiler to be fully compliant with C++11 or build an older version of dlib, such as 19.21.") -endif() if (COMMAND pybind11_add_module AND MSVC) # True when building a python extension module using Visual Studio. We care diff --git a/dlib/cmake_utils/set_compiler_specific_options.cmake b/dlib/cmake_utils/set_compiler_specific_options.cmake index 7004333be..e4d426b73 100644 --- a/dlib/cmake_utils/set_compiler_specific_options.cmake +++ b/dlib/cmake_utils/set_compiler_specific_options.cmake @@ -46,8 +46,8 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_LESS 4.8) - message(FATAL_ERROR "C++11 is required to use dlib, but the version of GCC you are using is too old and doesn't support C++11. You need GCC 4.8 or newer. ") + if (GCC_VERSION VERSION_LESS 4.9) + message(FATAL_ERROR "C++11 is required to use dlib, but the version of GCC you are using is too old and doesn't support C++11. You need GCC 4.9 or newer. ") endif() endif()