Unverified Commit bd1de08f by Tianqi Chen Committed by GitHub

[C++] Require c++14 by default (#5056)

parent 6d2838a4
...@@ -259,15 +259,9 @@ include(cmake/modules/contrib/TFLite.cmake) ...@@ -259,15 +259,9 @@ include(cmake/modules/contrib/TFLite.cmake)
if(NOT MSVC) if(NOT MSVC)
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
if(NOT USE_LLVM STREQUAL "OFF" AND TVM_LLVM_VERSION GREATER 91) check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14)
check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14) message(STATUS "Build with c++14")
message(STATUS "Build with c++14") set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
else()
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
message(STATUS "Build with c++11")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
endif()
endif() endif()
add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS}) add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS})
......
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