diff --git a/cmake/OpenCL.cmake b/cmake/OpenCL.cmake index df86d3434d..cf4274b472 100644 --- a/cmake/OpenCL.cmake +++ b/cmake/OpenCL.cmake @@ -42,5 +42,5 @@ endif() add_definitions(-DCL_TARGET_OPENCL_VERSION=120) set(DNNL_GPU_RUNTIME_CURRENT ${DNNL_GPU_RUNTIME}) -include_directories(${OpenCL_INCLUDE_DIRS}) +# include_directories(${OpenCL_INCLUDE_DIRS}) list(APPEND EXTRA_SHARED_LIBS OpenCL::OpenCL) diff --git a/cmake/TBB.cmake b/cmake/TBB.cmake index d6bbe3e801..a62a251175 100644 --- a/cmake/TBB.cmake +++ b/cmake/TBB.cmake @@ -26,7 +26,7 @@ include("cmake/Threading.cmake") macro(handle_tbb_target) if(TBB_FOUND) set_property(TARGET TBB::tbb PROPERTY "MAP_IMPORTED_CONFIG_RELWITHMDD" "DEBUG") - include_directories_with_host_compiler(${_tbb_include_dirs}) + # include_directories_with_host_compiler(${_tbb_include_dirs}) list(APPEND EXTRA_SHARED_LIBS ${TBB_IMPORTED_TARGETS}) # Print TBB location diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 9f0aa2a1db..ade68da1af 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -50,5 +50,7 @@ endif() set(OBJ_LIB ${LIB_PACKAGE_NAME}_common) add_library(${OBJ_LIB} OBJECT ${SOURCES}) +target_include_directories(${OBJ_LIB} PRIVATE + $) set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS $) diff --git a/src/gpu/CMakeLists.txt b/src/gpu/CMakeLists.txt index 0292ebb021..0c79f7a7aa 100644 --- a/src/gpu/CMakeLists.txt +++ b/src/gpu/CMakeLists.txt @@ -27,6 +27,8 @@ add_definitions_with_host_compiler(-DNGEN_WINDOWS_COMPAT) set(OBJ_LIB ${LIB_PACKAGE_NAME}_gpu) add_library(${OBJ_LIB} OBJECT ${SOURCES}) +target_include_directories(${OBJ_LIB} PRIVATE + $) set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS $) diff --git a/src/gpu/compute/CMakeLists.txt b/src/gpu/compute/CMakeLists.txt index d69ed519a1..e6a1fe6924 100644 --- a/src/gpu/compute/CMakeLists.txt +++ b/src/gpu/compute/CMakeLists.txt @@ -23,5 +23,7 @@ file(GLOB_RECURSE SOURCES set(OBJ_LIB ${LIB_PACKAGE_NAME}_gpu_compute) add_library(${OBJ_LIB} OBJECT ${SOURCES}) +target_include_directories(${OBJ_LIB} PRIVATE + $) set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS $) diff --git a/src/gpu/jit/CMakeLists.txt b/src/gpu/jit/CMakeLists.txt index 38fb5abe07..ac4b0a3523 100644 --- a/src/gpu/jit/CMakeLists.txt +++ b/src/gpu/jit/CMakeLists.txt @@ -32,5 +32,7 @@ endif() set(OBJ_LIB ${LIB_PACKAGE_NAME}_gpu_jit) add_library(${OBJ_LIB} OBJECT ${SOURCES}) +target_include_directories(${OBJ_LIB} PRIVATE + $) set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS $) diff --git a/src/gpu/ocl/CMakeLists.txt b/src/gpu/ocl/CMakeLists.txt index 711645b87f..6e9623798f 100644 --- a/src/gpu/ocl/CMakeLists.txt +++ b/src/gpu/ocl/CMakeLists.txt @@ -39,5 +39,7 @@ list(APPEND SOURCES ${kernel_list_src}) set(OBJ_LIB ${LIB_PACKAGE_NAME}_gpu_ocl) add_library(${OBJ_LIB} OBJECT ${SOURCES}) +target_include_directories(${OBJ_LIB} PRIVATE + $) set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS $)