do not attempt to build with gcc 4.8.5 or older (#2357)

* do not attempt to build with gcc 4.8.5 or older

* add comment
This commit is contained in:
Adrià Arrufat 2021-04-27 20:03:32 +09:00 committed by GitHub
parent 9b502d29a4
commit 8e9755ab0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,12 @@ 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
# about this because a huge number of windows users have broken systems, and