X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=CMakeModules%2FSalomeSetupPlatform.cmake;h=aa6b80e117dae7bff0d8080317c4ae018df7b7d5;hb=2dd38027f59d453ff1098cb63d249998cfbc213e;hp=6d8fbf1d2bd6a7357f2ec08ec3f4251b7efa0115;hpb=94e113383a1b34c5a3370669c989ef7363d6248e;p=tools%2Fdocumentation.git diff --git a/CMakeModules/SalomeSetupPlatform.cmake b/CMakeModules/SalomeSetupPlatform.cmake index 6d8fbf1..aa6b80e 100644 --- a/CMakeModules/SalomeSetupPlatform.cmake +++ b/CMakeModules/SalomeSetupPlatform.cmake @@ -166,16 +166,18 @@ IF(NOT WIN32) ENDIF() ENDIF() -# 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) +IF(NOT NO_CXX11_SUPPORT) + # 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 "Enable C++11 support") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -ELSEIF(COMPILER_SUPPORTS_CXX0X) + ELSEIF(COMPILER_SUPPORTS_CXX0X) MESSAGE(STATUS "Enable C++0x support") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -ELSE() + ELSE() MESSAGE(WARNING "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.") + ENDIF() ENDIF()