build: let SYCL to choose C++ standard

This commit is contained in:
Denis Samoilov
2021-03-31 16:31:43 -07:00
parent 4a129541fd
commit 1b026f5e30
+8 -5
View File
@@ -106,11 +106,6 @@ set(CMAKE_SRC_CCXX_FLAGS) # SRC specifics
set(CMAKE_EXAMPLE_CCXX_FLAGS) # EXAMPLE specifics
set(CMAKE_TEST_CCXX_FLAGS) # TESTS specifics
if(UNIX OR MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
include("cmake/mkldnn_compat.cmake")
include("cmake/utils.cmake")
@@ -130,6 +125,14 @@ include("cmake/coverage.cmake")
include("cmake/build_types.cmake")
include("cmake/testing.cmake")
if(UNIX OR MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# Let SYCL to choose the C++ standard it needs.
if(NOT DNNL_WITH_SYCL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
endif()
# Handle cases when OpenMP runtime is requested but not found: override CPU
# runtime to be sequential
if(DNNL_CPU_RUNTIME STREQUAL "OMP" AND