From 3037c0d637ad0d8535cdb92e9a993117de922746 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Mon, 25 Jul 2022 14:52:27 +0200
Subject: [PATCH] c++11 mandatory

---
 CMakeLists.txt | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b11704e..d24dbbd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,17 +25,11 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -D_REENTRANT")
 #Set compiler according C++11 support
 include(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 if(COMPILER_SUPPORTS_CXX11)
-		message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++11 support.")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-        #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99")
-elseif(COMPILER_SUPPORTS_CXX0X)
-		message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++0x support.")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-        #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99")
+  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++11 support.")
+  set(CMAKE_CXX_STANDARD 11)
 else()
-        message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
 endif()
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
-- 
GitLab