From bd1de08f8eb80bbcf92fb3965dec6a715db481fd Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Thu, 12 Mar 2020 15:31:56 -0700 Subject: [PATCH] [C++] Require c++14 by default (#5056) --- CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dafef18..db63903 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,15 +259,9 @@ include(cmake/modules/contrib/TFLite.cmake) if(NOT MSVC) include(CheckCXXCompilerFlag) - if(NOT USE_LLVM STREQUAL "OFF" AND TVM_LLVM_VERSION GREATER 91) - check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14) - message(STATUS "Build with c++14") - 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() + check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14) + message(STATUS "Build with c++14") + set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}") endif() add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS}) -- 2.7.4