diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 78949054ef14c..b1d08b1aa364e 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -108,15 +108,12 @@ define_property(GLOBAL PROPERTY SYCL_TOOLCHAIN_INSTALL_COMPONENTS if (MSVC) set(CMAKE_CXX_FLAGS "/W4 ${CMAKE_CXX_FLAGS}") else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-deprecated-declarations") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") endif() if(SYCL_ENABLE_WERROR) if(MSVC) set(CMAKE_CXX_FLAGS "/WX ${CMAKE_CXX_FLAGS}") - add_definitions( - -wd4996 # Suppress 'function': was declared deprecated' - ) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif() diff --git a/sycl/source/detail/scheduler/scheduler.hpp b/sycl/source/detail/scheduler/scheduler.hpp index 43c70ea55e2fd..0cb7dda96d33a 100644 --- a/sycl/source/detail/scheduler/scheduler.hpp +++ b/sycl/source/detail/scheduler/scheduler.hpp @@ -188,7 +188,6 @@ using EventImplPtr = std::shared_ptr; using QueueImplPtr = std::shared_ptr; using StreamImplPtr = std::shared_ptr; -using QueueIdT = std::hash>::result_type; using CommandPtr = std::unique_ptr; /// Memory Object Record diff --git a/sycl/tools/sycl-ls/CMakeLists.txt b/sycl/tools/sycl-ls/CMakeLists.txt index b90bd972d3672..9bb17dee4145b 100644 --- a/sycl/tools/sycl-ls/CMakeLists.txt +++ b/sycl/tools/sycl-ls/CMakeLists.txt @@ -8,8 +8,8 @@ if (WIN32 AND "${build_type_lower}" MATCHES "debug") set(sycl_lib sycld) endif() -# Disable aspect::image warning. -target_compile_definitions(sycl-ls PRIVATE SYCL_DISABLE_IMAGE_ASPECT_WARNING) +# Disable aspect::image & deprecation warnings. +target_compile_definitions(sycl-ls PRIVATE SYCL_DISABLE_IMAGE_ASPECT_WARNING SYCL2020_DISABLE_DEPRECATION_WARNINGS) target_link_libraries(sycl-ls PRIVATE diff --git a/sycl/unittests/CMakeLists.txt b/sycl/unittests/CMakeLists.txt index ecff3982baf6a..aaad18cbde4f5 100644 --- a/sycl/unittests/CMakeLists.txt +++ b/sycl/unittests/CMakeLists.txt @@ -8,6 +8,8 @@ foreach(flag_var string(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}") endforeach() +add_compile_definitions(SYCL2020_DISABLE_DEPRECATION_WARNINGS) + # suppress warnings which came from Google Test sources if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG) add_compile_options("-Wno-suggest-override") diff --git a/sycl/unittests/SYCL2020/GetNativeOpenCL.cpp b/sycl/unittests/SYCL2020/GetNativeOpenCL.cpp index 25e806541b7d1..db36d59fb0153 100644 --- a/sycl/unittests/SYCL2020/GetNativeOpenCL.cpp +++ b/sycl/unittests/SYCL2020/GetNativeOpenCL.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS #define __SYCL_INTERNAL_API #include diff --git a/sycl/unittests/SYCL2020/SpecializationConstant.cpp b/sycl/unittests/SYCL2020/SpecializationConstant.cpp index 01dd78a6795bf..fa14ff2601c16 100644 --- a/sycl/unittests/SYCL2020/SpecializationConstant.cpp +++ b/sycl/unittests/SYCL2020/SpecializationConstant.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include diff --git a/sycl/unittests/buffer/BufferLocation.cpp b/sycl/unittests/buffer/BufferLocation.cpp index 71c6d1fa545cd..dc0276b859c19 100644 --- a/sycl/unittests/buffer/BufferLocation.cpp +++ b/sycl/unittests/buffer/BufferLocation.cpp @@ -5,8 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include diff --git a/sycl/unittests/buffer/Image.cpp b/sycl/unittests/buffer/Image.cpp index 9b8c642f7540d..e1befe9e950fc 100644 --- a/sycl/unittests/buffer/Image.cpp +++ b/sycl/unittests/buffer/Image.cpp @@ -5,8 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include diff --git a/sycl/unittests/context_device/DeviceRefCounter.cpp b/sycl/unittests/context_device/DeviceRefCounter.cpp index 4803372a95aa6..f9491a4094bd8 100644 --- a/sycl/unittests/context_device/DeviceRefCounter.cpp +++ b/sycl/unittests/context_device/DeviceRefCounter.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/sycl/unittests/kernel-and-program/Cache.cpp b/sycl/unittests/kernel-and-program/Cache.cpp index 92f76e7f097f1..8405e9a7debce 100644 --- a/sycl/unittests/kernel-and-program/Cache.cpp +++ b/sycl/unittests/kernel-and-program/Cache.cpp @@ -8,9 +8,6 @@ // All these tests are temporarily disabled, since they need to be rewrited // after the sycl::program class removal to use the kernel_bundle instead. - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include "detail/context_impl.hpp" #include "detail/kernel_program_cache.hpp" #include "sycl/detail/ur.hpp" diff --git a/sycl/unittests/kernel-and-program/InMemCacheEviction.cpp b/sycl/unittests/kernel-and-program/InMemCacheEviction.cpp index 70c121053cee9..0fd2d6a1dbcac 100644 --- a/sycl/unittests/kernel-and-program/InMemCacheEviction.cpp +++ b/sycl/unittests/kernel-and-program/InMemCacheEviction.cpp @@ -6,9 +6,6 @@ // //===----------------------------------------------------------------------===// // This file contains tests covering eviction in in-memory program cache. - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include "../thread_safety/ThreadUtils.h" #include "detail/context_impl.hpp" #include "detail/kernel_program_cache.hpp" diff --git a/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp b/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp index 2c34ba6d11604..952c71d39bb5a 100644 --- a/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp +++ b/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp @@ -5,8 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS #ifndef __SYCL_INTERNAL_API #define __SYCL_INTERNAL_API #endif diff --git a/sycl/unittests/kernel-and-program/KernelInfo.cpp b/sycl/unittests/kernel-and-program/KernelInfo.cpp index f7297a4145485..b23e7b890b11a 100644 --- a/sycl/unittests/kernel-and-program/KernelInfo.cpp +++ b/sycl/unittests/kernel-and-program/KernelInfo.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/sycl/unittests/kernel-and-program/KernelRelease.cpp b/sycl/unittests/kernel-and-program/KernelRelease.cpp index 7d0e862b284ee..17365053fdd61 100644 --- a/sycl/unittests/kernel-and-program/KernelRelease.cpp +++ b/sycl/unittests/kernel-and-program/KernelRelease.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/sycl/unittests/kernel-and-program/MultipleDevsCache.cpp b/sycl/unittests/kernel-and-program/MultipleDevsCache.cpp index 138bde428062f..3f040d3fa0aed 100644 --- a/sycl/unittests/kernel-and-program/MultipleDevsCache.cpp +++ b/sycl/unittests/kernel-and-program/MultipleDevsCache.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include "detail/context_impl.hpp" #include "detail/kernel_bundle_impl.hpp" #include "detail/kernel_program_cache.hpp" diff --git a/sycl/unittests/kernel-and-program/OutOfResources.cpp b/sycl/unittests/kernel-and-program/OutOfResources.cpp index ed2ed0cd9f42d..a7ab68783c337 100644 --- a/sycl/unittests/kernel-and-program/OutOfResources.cpp +++ b/sycl/unittests/kernel-and-program/OutOfResources.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include "detail/context_impl.hpp" #include "detail/kernel_bundle_impl.hpp" #include "detail/kernel_program_cache.hpp" diff --git a/sycl/unittests/program_manager/BuildLog.cpp b/sycl/unittests/program_manager/BuildLog.cpp index c204c603655a6..c21b458b4010b 100644 --- a/sycl/unittests/program_manager/BuildLog.cpp +++ b/sycl/unittests/program_manager/BuildLog.cpp @@ -5,9 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - #include "gtest/internal/gtest-internal.h" -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS #include #include diff --git a/sycl/unittests/program_manager/CompileTarget.cpp b/sycl/unittests/program_manager/CompileTarget.cpp index f39e4d717c59e..9e5e1f8f8e369 100644 --- a/sycl/unittests/program_manager/CompileTarget.cpp +++ b/sycl/unittests/program_manager/CompileTarget.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/sycl/unittests/program_manager/itt_annotations.cpp b/sycl/unittests/program_manager/itt_annotations.cpp index f7c70a996b0e7..cb366f9170c94 100644 --- a/sycl/unittests/program_manager/itt_annotations.cpp +++ b/sycl/unittests/program_manager/itt_annotations.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/sycl/unittests/scheduler/RequiredWGSize.cpp b/sycl/unittests/scheduler/RequiredWGSize.cpp index 576c73d630eb9..25c1f175e4e5c 100644 --- a/sycl/unittests/scheduler/RequiredWGSize.cpp +++ b/sycl/unittests/scheduler/RequiredWGSize.cpp @@ -5,9 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#define SYCL2020_DISABLE_DEPRECATION_WARNINGS - #include #include #include