From 8e9755ab0f0825988c4955fda71bacdb2432ed28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= <1671644+arrufat@users.noreply.github.com> Date: Tue, 27 Apr 2021 20:03:32 +0900 Subject: [PATCH] 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 --- dlib/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index 8039d7156..fd266f84a 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -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