]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Let C++ extensions be enabled by default (standard CMake behavior)
authorvsr <vsr@opencascade.com>
Mon, 21 Sep 2020 11:23:40 +0000 (14:23 +0300)
committervsr <vsr@opencascade.com>
Mon, 21 Sep 2020 11:23:40 +0000 (14:23 +0300)
cmake/SalomeSetupPlatform.cmake

index a5f713a0110ee1a66e4ac265e0d166c3f92c1f10..55ffc5d6d7d388c63c40eaf9f9f4c3dd5301887e 100644 (file)
@@ -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