From b65a3249e0b290f29cff9125d978cb00619e9b22 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 23 Jan 2025 16:08:32 +0400 Subject: [PATCH] GPU: fixed debug build on non-Windows (#28629) ### Details: - oneDNN headers incorrectly use `_MSVC_LANG` w/o any checks that platform is Windows ### Tickets: - CVS-161069 --- src/plugins/intel_gpu/thirdparty/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_gpu/thirdparty/CMakeLists.txt b/src/plugins/intel_gpu/thirdparty/CMakeLists.txt index c3ae531e247e5d..475e9213ecf9f0 100644 --- a/src/plugins/intel_gpu/thirdparty/CMakeLists.txt +++ b/src/plugins/intel_gpu/thirdparty/CMakeLists.txt @@ -46,7 +46,8 @@ if(ENABLE_ONEDNN_FOR_GPU) endif() foreach(cmake_var IN ITEMS CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION - CMAKE_SYSTEM_PROCESSOR CMAKE_TOOLCHAIN_FILE) + CMAKE_SYSTEM_PROCESSOR CMAKE_TOOLCHAIN_FILE + CMAKE_VERBOSE_MAKEFILE) if(${cmake_var}) list(APPEND cmake_extra_args "-D${cmake_var}=${${cmake_var}}") endif() @@ -141,8 +142,7 @@ if(ENABLE_ONEDNN_FOR_GPU) EXCLUDE_FROM_ALL ON ) - list(APPEND LIB_INCLUDE_DIRS ${ONEDNN_INSTALL_DIR}/include) - list(APPEND LIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/onednn_gpu/src) + set(LIB_INCLUDE_DIRS "${ONEDNN_INSTALL_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/onednn_gpu/src") set(LIB_DEFINITIONS ENABLE_ONEDNN_FOR_GPU DNNL_DLL DNNL_DLL_EXPORTS @@ -158,6 +158,7 @@ if(ENABLE_ONEDNN_FOR_GPU) set_target_properties(onednn_gpu_tgt PROPERTIES INTERFACE_LINK_LIBRARIES $ INTERFACE_INCLUDE_DIRECTORIES "$" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LIB_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${LIB_DEFINITIONS}" ) add_dependencies(onednn_gpu_tgt onednn_gpu_build)