From 2a719c18c250432f108ab082f8f9a1f0300efac7 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Mon, 1 Feb 2021 01:35:03 +0200 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b438bc..c0f92ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,9 +83,12 @@ else() if(${CMAKE_CXX_COMPILER_ID} MATCHES "(GNU)+") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CPP_STD_COMPILER_FLAG}") endif() - # Try the standard method as well - set(CMAKE_CXX_STANDARD ${CPP_STD_NUMBER}) - set(CMAKE_CXX_STANDARD_REQUIRED ON) + # F* you too Debian. What can I say. + if(CMAKE_VERSION VERSION_LESS "3.8.0" AND CPP_STD_NUMBER LESS 17) + # Try the standard method as well + set(CMAKE_CXX_STANDARD ${CPP_STD_NUMBER}) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + endif() endif() # Determine if build mode