Skip to content

Commit 8a93b87

Browse files
AlexPeskovluweizhou2016
authored andcommitted
[FIX] Include TBB headers as system
There is a problem with compilation with -wundef warning flag. Include tbb directory by --system alow to avoid checker passes for TBB headers.
1 parent f5ba9c9 commit 8a93b87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/TBB.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ include("cmake/Threading.cmake")
2626
macro(handle_tbb_target)
2727
if(TBB_FOUND)
2828
set_property(TARGET TBB::tbb PROPERTY "MAP_IMPORTED_CONFIG_RELWITHMDD" "DEBUG")
29-
include_directories_with_host_compiler(${_tbb_include_dirs})
29+
foreach(inc_dir ${_tbb_include_dirs})
30+
include_directories(BEFORE SYSTEM ${inc_dir})
31+
append_host_compiler_options(CMAKE_CXX_FLAGS "-I${inc_dir}")
32+
endforeach()
3033
list(APPEND EXTRA_SHARED_LIBS ${TBB_IMPORTED_TARGETS})
3134

3235
# Print TBB location

0 commit comments

Comments
 (0)