forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Move level zero submodule from npu to common (openvinotoolkit…
…#26626) ### Details: - L0 submodule can be reused between GPU and NPU plugins, so moved to common thirdparty dependencies
- Loading branch information
1 parent
c805873
commit e934d83
Showing
7 changed files
with
54 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2018-2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
set(BUILD_SHARED_LIBS OFF) | ||
|
||
|
||
# We have to avoid linking against loader with debug postfix due it's a part of driver | ||
# and the name will be the same for release and debug configurations | ||
set(CMAKE_DEBUG_POSTFIX "") | ||
|
||
# Skip warnings as errors for thirdparty | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") | ||
ov_add_compiler_flags(/WX-) | ||
# solve pdb access issue | ||
set(USE_Z7 ON) | ||
# Close spectre for ze loader | ||
add_compile_options("/Qspectre-") | ||
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) | ||
ov_add_compiler_flags(-Wno-error) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ | ||
-Wno-undef \ | ||
-Wno-missing-declarations") | ||
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable") | ||
endif() | ||
endif() | ||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF) | ||
add_subdirectory(level-zero EXCLUDE_FROM_ALL) | ||
|
||
set_property(TARGET ze_loader APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/level-zero/include>) | ||
|
||
# This VERSION file created by L0 may cause compilation issue of oneTBB headers, so remove it | ||
file(REMOVE "${CMAKE_BINARY_DIR}/VERSION") |