Better check for compiler standard support
@@ -70,12 +70,8 @@ if (USINGISYSTEM AND GCC_VERSION VERSION_LESS 6.0)
endforeach()
endif()
-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-if(COMPILER_SUPPORTS_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-else()
- message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
-endif()
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_STANDARD 11)
endif(NOT PYTHON_ONLY AND ENABLE_CLANG_JIT)
