Skip to content

Commit c79e543

Browse files
committed
tests: exclude C API tests for TBB threading runtime
1 parent 8312c3a commit c79e543

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===============================================================================
2-
# Copyright 2016-2022 Intel Corporation
2+
# Copyright 2016-2023 Intel Corporation
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -62,7 +62,13 @@ append(CMAKE_CXX_FLAGS "${CMAKE_TEST_CCXX_NOWARN_FLAGS}")
6262

6363
append_host_compiler_options(CMAKE_CXX_FLAGS "${DPCPP_CXX_NOWARN_FLAGS}")
6464

65-
if(NOT DNNL_CPU_RUNTIME STREQUAL "NONE" AND NOT DNNL_ENABLE_STACK_CHECKER)
65+
if(NOT DNNL_CPU_RUNTIME STREQUAL "NONE" AND
66+
NOT DNNL_ENABLE_STACK_CHECKER AND
67+
# TBB threading runtime requires explicit finalization for tests used
68+
# under CTest. Since TBB doesn't provide C API to perform finalization
69+
# we have to skip C tests.
70+
NOT DNNL_CPU_RUNTIME STREQUAL "TBB" AND
71+
NOT DNNL_CPU_SYCL)
6672
find_libm(LIBM)
6773
register_exe(api-c api.c "test" "${LIBM}")
6874
endif()

0 commit comments

Comments
 (0)