Skip to content

Commit d58ac41

Browse files
committed
examples: exclude C examples for TBB threading
1 parent f8c67b9 commit d58ac41

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ if(DNNL_CPU_SYCL)
9090
endforeach()
9191
endif()
9292

93+
# Do not build C examples for TBB threading runtime because
94+
# TBB doesn't provide C API to do explicit finalization.
95+
if (DNNL_CPU_RUNTIME STREQUAL "TBB" OR DNNL_CPU_SYCL)
96+
foreach(f ${sources})
97+
get_filename_component(fname ${f} NAME)
98+
if(${fname} MATCHES ".*\\.c$")
99+
list(REMOVE_ITEM sources "${f}")
100+
endif()
101+
endforeach()
102+
endif()
103+
93104
foreach(src ${sources})
94105
file(RELATIVE_PATH src_rel_path ${CMAKE_CURRENT_SOURCE_DIR} ${src})
95106
string(REGEX REPLACE "[/_\\.]" "-" example_name ${src_rel_path})

0 commit comments

Comments
 (0)