Commit 84757cec authored by Teng Qin's avatar Teng Qin Committed by Brenden Blanco

Better check for compiler standard support

parent 86bcc27d
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment