Files
openvino/thirdparty/ittapi/CMakeLists.txt
Ilya Lavrenov c29f111717 Enabled Windows ARM64 build using MSVC cl compiler (#15132)
* Fixed Windows Arm64 build

* Fixed linker warnings in docs

* Fixed Windowd ARM build

* Reverted changes in docs

* Added OpenVINO level macro to define CPU architecture

* Properly remove xbyak from reference kernels optimizations

* Added documentation for cmake functions

* Fixed samples build

* Added installation dir for host protoc

* Fixed installation stage for host_protoc

* Added build dir

* Fixed compilation on Apple

* cççç

* Fixed clang code-style

* Tely on CPU id from xbyak

* Fixed build

* Fixed compilation on mac

* Fixed compilation
2023-01-17 17:29:00 +04:00

28 lines
1.1 KiB
CMake

# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(DEFINED INTEL_VTUNE_DIR OR DEFINED ENV{INTEL_VTUNE_DIR})
find_package(ITT
PATHS "${OpenVINO_SOURCE_DIR}/src/common/itt/cmake"
NO_DEFAULT_PATH)
if(NOT ITT_FOUND)
message(WARNING "Profiling option enabled, but no ITT library was found under INTEL_VTUNE_DIR")
endif()
else()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ittapi ${CMAKE_BINARY_DIR}/_deps/ittapi EXCLUDE_FROM_ALL)
target_compile_definitions(ittnotify INTERFACE ENABLE_PROFILING_ITT)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(ittnotify PRIVATE -Wno-undef)
endif()
# override INTERFACE_INCLUDE_DIRECTORIES
set_property(TARGET ittnotify PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ittapi/src/ittnotify>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ittapi/include>)
openvino_developer_export_targets(COMPONENT openvino_common TARGETS ittnotify)
ov_install_static_lib(ittnotify ${OV_CPACK_COMP_CORE})
endif()