Warning, /acts/Detray/cmake/detray-compiler-options-sycl.cmake is written in an unsupported language. File is not indexed.
0001 # This file is part of the ACTS project.
0002 #
0003 # Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008
0009 cmake_minimum_required(VERSION 3.21)
0010
0011 # Only set these compiler flags if we are the top level project.
0012 if(PROJECT_IS_TOP_LEVEL)
0013 # Include the helper function(s).
0014 include(detray-functions)
0015
0016 # Basic flags for all build modes.
0017 detray_add_flag( CMAKE_SYCL_FLAGS "-Wall" )
0018 detray_add_flag( CMAKE_SYCL_FLAGS "-Wextra" )
0019 detray_add_flag( CMAKE_SYCL_FLAGS "-Wno-unknown-cuda-version" )
0020 detray_add_flag( CMAKE_SYCL_FLAGS "-Wshadow" )
0021 detray_add_flag( CMAKE_SYCL_FLAGS "-Wunused-local-typedefs" )
0022 if(NOT WIN32)
0023 detray_add_flag( CMAKE_SYCL_FLAGS "-pedantic" )
0024 endif()
0025
0026 # Avoid issues coming from MSVC<->DPC++ argument differences.
0027 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
0028 detray_add_flag(CMAKE_SYCL_FLAGS
0029 "-Wno-unused-command-line-argument"
0030 )
0031 endif()
0032
0033 # Fail on warnings, if asked for that behaviour.
0034 if(DETRAY_FAIL_ON_WARNINGS)
0035 detray_add_flag( CMAKE_SYCL_FLAGS "-Werror" )
0036 endif()
0037 endif()