From 68646b87c6727c8ac83d360c34d5e2ac8d234716 Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Wed, 10 Dec 2025 21:48:21 -0800 Subject: [PATCH] [SYCL][Unittests] Check for C++20 support before enabling IPC tests This commit changes the CMake for the IPC unittests to check for C++20 support before enabling the tests. Signed-off-by: Larsen, Steffen --- .../InterProcessCommunication/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sycl/unittests/Extensions/InterProcessCommunication/CMakeLists.txt b/sycl/unittests/Extensions/InterProcessCommunication/CMakeLists.txt index 424947b14bca2..0c01806b6617d 100644 --- a/sycl/unittests/Extensions/InterProcessCommunication/CMakeLists.txt +++ b/sycl/unittests/Extensions/InterProcessCommunication/CMakeLists.txt @@ -1,6 +1,8 @@ -add_sycl_unittest(IPCTests OBJECT - Memory.cpp -) +if("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES) + add_sycl_unittest(IPCTests OBJECT + Memory.cpp + ) -set_target_properties(IPCTests_Preview_Tests PROPERTIES CXX_STANDARD 20) -set_target_properties(IPCTests_Non_Preview_Tests PROPERTIES CXX_STANDARD 20) + target_compile_features(IPCTests_Preview_Tests PUBLIC cxx_std_20) + target_compile_features(IPCTests_Non_Preview_Tests PUBLIC cxx_std_20) +endif()