Unverified Commit 35122075 authored by nv-dlasalle's avatar nv-dlasalle Committed by GitHub
Browse files

Change standard to c++14 to be compatible to tensorpipe's dependencies (#3712)


Co-authored-by: default avatarJinjing Zhou <VoVAllen@users.noreply.github.com>
parent 25c9221b
......@@ -92,11 +92,10 @@ if(MSVC)
endif()
else(MSVC)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
# tensorpipe's dependencies require C++14
check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14)
set(CMAKE_C_FLAGS "-O2 -Wall -fPIC ${CMAKE_C_FLAGS}")
# We still use c++11 flag in CPU build because gcc5.4 (our default compiler) is
# not fully compatible with c++14 feature.
set(CMAKE_CXX_FLAGS "-O2 -Wall -fPIC -std=c++11 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "-O2 -Wall -fPIC -std=c++14 ${CMAKE_CXX_FLAGS}")
if(NOT APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--warn-common ${CMAKE_SHARED_LINKER_FLAGS}")
endif(NOT APPLE)
......
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