Skip to content

Commit 8c614ad

Browse files
[SYCL][Unittests] Check for C++20 support before enabling IPC tests (#20874)
This commit changes the CMake for the IPC unittests to check for C++20 support before enabling the tests. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 6309d6d commit 8c614ad

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
add_sycl_unittest(IPCTests OBJECT
2-
Memory.cpp
3-
)
1+
if("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
2+
add_sycl_unittest(IPCTests OBJECT
3+
Memory.cpp
4+
)
45

5-
set_target_properties(IPCTests_Preview_Tests PROPERTIES CXX_STANDARD 20)
6-
set_target_properties(IPCTests_Non_Preview_Tests PROPERTIES CXX_STANDARD 20)
6+
target_compile_features(IPCTests_Preview_Tests PUBLIC cxx_std_20)
7+
target_compile_features(IPCTests_Non_Preview_Tests PUBLIC cxx_std_20)
8+
endif()

0 commit comments

Comments
 (0)