From f216b92a43c101ea685ed7336e88193c50e04e12 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 21 Sep 2020 14:23:40 +0300 Subject: [PATCH] Let C++ extensions be enabled by default (standard CMake behavior) --- cmake/SalomeSetupPlatform.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/SalomeSetupPlatform.cmake b/cmake/SalomeSetupPlatform.cmake index a5f713a..55ffc5d 100644 --- a/cmake/SalomeSetupPlatform.cmake +++ b/cmake/SalomeSetupPlatform.cmake @@ -106,7 +106,9 @@ IF(COMPILER_SUPPORTS_NO_OPERATOR_NAMES) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names") ENDIF() -# C++ standard to use; NOTE: extensions are not allowed! +# Option: C++ standard to use +# Note: CMake by default enables C++ extensions; they can be disabled by additionally +# specifying -DCMAKE_CXX_EXTENSIONS=OFF SET(SALOME_CXX_STANDARD 11 CACHE STRING "C++ standard to use") SET(_supported_standards 11 14 17 20) IF(NOT ${SALOME_CXX_STANDARD} IN_LIST _supported_standards) @@ -115,7 +117,6 @@ ENDIF() UNSET(_supported_standards) MESSAGE(STATUS "Setting C++ standard to ${SALOME_CXX_STANDARD}") SET(CMAKE_CXX_STANDARD ${SALOME_CXX_STANDARD}) -SET(CMAKE_CXX_EXTENSIONS OFF) SET(CMAKE_CXX_STANDARD_REQUIRED ON) # Fight warnings -- 2.39.2