include(${CMAKE_ROOT}/Modules/Compiler/CMakeCommonCompilerMacros.cmake)

set(CMAKE_SYCL_VERBOSE_FLAG "-v")

if(NOT "x${CMAKE_SYCL_SIMULATE_ID}" STREQUAL "xMSVC")
  set(CMAKE_SYCL_COMPILE_OPTIONS_PIE -fPIE)
  set(CMAKE_SYCL_COMPILE_OPTIONS_PIC -fPIC)
  set(CMAKE_SYCL_COMPILE_OPTIONS_VISIBILITY -fvisibility=)
  string(APPEND CMAKE_SYCL_FLAGS_INIT "-sycl-driver")
  string(APPEND CMAKE_SYCL_FLAGS_DEBUG_INIT " -g")
  string(APPEND CMAKE_SYCL_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
  string(APPEND CMAKE_SYCL_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG")
  string(APPEND CMAKE_SYCL_FLAGS_RELWITHDEBINFO_INIT " -Og -g -DNDEBUG")
endif()
set(CMAKE_SHARED_LIBRARY_CREATE_SYCL_FLAGS -shared)
set(CMAKE_INCLUDE_SYSTEM_FLAG_SYCL -isystem=)

set(CMAKE_DEPFILE_FLAGS_SYCL "-MD -MT <OBJECT> -MF <DEPFILE>")
set(CMAKE_SYCL_CREATE_PREPROCESSED_SOURCE "<CMAKE_SYCL_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_SYCL_CREATE_ASSEMBLY_SOURCE "<CMAKE_SYCL_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

__compiler_check_default_language_standard(CXX 3.9 98 6.0 14)
