From fe385ccf367499e841e3d459cded359f54136f0e Mon Sep 17 00:00:00 2001 From: SALOME Date: Mon, 24 Aug 2020 10:50:37 +0300 Subject: [PATCH] Set C++17 stanard by default --- cmake/SalomeSetupPlatform.cmake | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/cmake/SalomeSetupPlatform.cmake b/cmake/SalomeSetupPlatform.cmake index a1290e6..abfb734 100644 --- a/cmake/SalomeSetupPlatform.cmake +++ b/cmake/SalomeSetupPlatform.cmake @@ -106,23 +106,8 @@ IF(COMPILER_SUPPORTS_NO_OPERATOR_NAMES) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names") ENDIF() -SET(NO_CXX11_SUPPORT OFF CACHE BOOL "Disable C++11 support") -IF(NOT NO_CXX11_SUPPORT) - # C++11 support - CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) - IF(COMPILER_SUPPORTS_CXX11) - MESSAGE(STATUS "Enable C++11 support") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - ELSE() - CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) - IF(COMPILER_SUPPORTS_CXX0X) - MESSAGE(STATUS "Enable C++0x support") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - ELSE() - MESSAGE(WARNING "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.") - ENDIF() - ENDIF() -ENDIF() +SET(CMAKE_CXX_STANDARD 17) +SET(CMAKE_CXX_STANDARD_REQUIRED ON) # Fight warnings IF(NOT APPLE) -- 2.39.2