From: vsr Date: Mon, 21 Sep 2020 11:23:40 +0000 (+0300) Subject: Let C++ extensions be enabled by default (standard CMake behavior) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f216b92a43c101ea685ed7336e88193c50e04e12;p=tools%2Fconfiguration.git Let C++ extensions be enabled by default (standard CMake behavior) --- 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