Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
91b9a52
Merge pull request #133 from kokkos/develop
crtrott Dec 9, 2021
c901382
Merge pull request #135 from kokkos/develop
crtrott Apr 5, 2022
39b9b4d
CMake list files for basic profilers #128
Oct 14, 2021
50a9cb4
CMake list file for PAPI connector #128
Oct 21, 2021
f2ddcfa
CMake list file for Variorum connector #128
Oct 22, 2021
b6cd284
PAPI find module fixes #128
Nov 3, 2021
a4fb677
Fixed module path #128
Nov 3, 2021
e76ec93
Fixed VTune_ROOT #128
Nov 3, 2021
e5e3f7b
Caliper submodule and configuration #128
Nov 3, 2021
ec0ab4d
Find MPI, OpenMP and PAPI in main CMake file #128
Nov 4, 2021
4df2c98
Apex submodule and configuration #128
Nov 4, 2021
65f541e
Tools and Kokkos options (Kokkos in parent project) #128
Nov 4, 2021
e4955bc
Use `option` to define CMake options #128
Nov 10, 2021
0b2fe58
Fix case in option names #128
Nov 10, 2021
e7a2765
Option for PAPI support #128
Nov 11, 2021
28c1dd5
Fix forced compiler settings (allow user build options) #128
Nov 11, 2021
4e2ba50
Fix reduntant code in PAPI find module
Nov 11, 2021
d255988
Fix case in option names #128
Nov 11, 2021
60fc102
Prefix Caliper options #128
Nov 11, 2021
a35ca69
FIxed find modules pick up order #128
Nov 11, 2021
f9f02bb
Define interface target and clean up its properties #128
Nov 11, 2021
bfeb921
Skip unnecesary guards in PAPI find module
Nov 12, 2021
74617e8
Skip [unused] components handling in PAPI find module
Nov 12, 2021
73f0b0a
Clean up Kokkos options extraction (still in progress) #128
Nov 12, 2021
57b86ee
Move Caliper and Apex configuration to separate file #128
Nov 12, 2021
3254309
Fixed missing USE_MPI guards in Variorum connector #128
Nov 12, 2021
d89fb16
MPI support enabled with KokkosTools_ENABLE_MPI #128
Nov 12, 2021
9b83ece
Cleaned redundant find_package(PAPI) #128
Nov 12, 2021
c4b8304
Fix OpenMP Tools build errors: disable OMPT in Apex and leave default…
Nov 12, 2021
23ea2a6
MPI config fixes
Dec 2, 2021
92f8129
Add shared libs option
Dec 2, 2021
78f7310
Initial single library interface + connect Caliper
Dec 2, 2021
61bc2ec
Adapt simple-kernel-timer for single library interface
Jan 31, 2022
32b1332
Connect kernel-timer to single-lib interface
Jan 18, 2022
621167f
Connect memory-usage to single-lib interface
Jan 22, 2022
7c7d2da
Rename activate_tool() to get_event_set()
Jan 31, 2022
8933909
Connect memory-events to single-lib interface
Jan 31, 2022
023bdea
Connect HighwaterMark to single-lib interface
Jan 31, 2022
b2e36cf
Refactoring of native handlers in single-lib interface
Feb 4, 2022
48671ac
Connect chrome-tracing
Feb 4, 2022
f6e43b4
Connect space-time-stack
Feb 5, 2022
fa49de9
Connect variorum-connector
Feb 5, 2022
f4a291f
Connect systemtap-connector
Feb 5, 2022
cd80433
Move Variorum config script to cmake folder
Feb 9, 2022
a9381ef
Fix missing MPI guard
Feb 9, 2022
422c5a1
Connect vtune-connector and vtune-focused-connector to single-lib int…
Feb 9, 2022
595fa79
Build static libraries with BUILD_SHARED_LIBS=OFF
Feb 12, 2022
8358b8f
Enable building on Windows
Feb 12, 2022
18b66a2
Detect and use Kokkos installation, if available
Feb 14, 2022
1478536
Find Caliper installations before building it
Feb 21, 2022
255e94b
Find existing Apex installations before building it
Feb 21, 2022
2a1f606
Rename ITT to avoid name conflict with Apex
Feb 21, 2022
7aed6bf
Remove memory-usage dependency on kp_memory_events.hpp
Feb 21, 2022
1682ce1
Configure Apex based on Kokkos settings
Feb 21, 2022
2e48b98
Configure Caliper based on Kokkos settings
Feb 21, 2022
dba222b
Add sample application
Feb 22, 2022
138e457
Adjust for Caliper methods rename
Feb 22, 2022
176abab
Fix nested namespaces (don't require c++17)
Feb 22, 2022
0752f69
Update submodules
Feb 22, 2022
2e5b2e7
Connect nvprof-connector
May 13, 2022
23e5f10
Add CMake installation/exports
May 16, 2022
08da308
Fix replicated BUILD_SHARED_LIBS effects
May 16, 2022
65469d0
Fixed defaults for clean build.
vlkale Dec 2, 2022
4b4ddb0
Fix to newline at end of file
vlkale Dec 2, 2022
494edc2
Merge pull request #2 from vlkale/cmake-build-system
fnrizzi Dec 3, 2022
c252cd5
Apple Error message and using Apple CMAKE variable
vlkale Dec 5, 2022
c29b726
Merge pull request #3 from vlkale/patch-2
fnrizzi Dec 6, 2022
a9d7900
Merge branch 'kokkos:master' into cmake-build-system
vlkale Dec 6, 2022
2d42240
Merge branch 'kokkos:master' into patch-2
vlkale Dec 6, 2022
4b0dce3
Merge pull request #1 from vlkale/patch-2
vlkale Dec 6, 2022
62ef536
More fixes for cleaner builds based on feedback
vlkale Dec 6, 2022
3acb2df
Merge pull request #4 from vlkale/cmake-build-system
fnrizzi Dec 7, 2022
49c6a0c
Error out if Caliper or Apex not found
vlkale Dec 8, 2022
204289e
Putting in Makefile
vlkale Dec 15, 2022
8119f38
Create Makefile alongside CmakeLists
vlkale Dec 15, 2022
485c3d4
Makefile add to cmakelists.txt
vlkale Dec 15, 2022
0eccc4c
Create Makefile
vlkale Dec 15, 2022
769d411
Create Makefile
vlkale Dec 15, 2022
20588f5
Create Makefile
vlkale Dec 15, 2022
51cd2dc
Create Makefile
vlkale Dec 15, 2022
a4d49ed
Create Makefile
vlkale Dec 15, 2022
1914e8b
HWM Makefile added
vlkale Dec 15, 2022
b560aa1
Create Makefile
vlkale Dec 15, 2022
a1cba3d
Create Makefile
vlkale Dec 15, 2022
9110bf0
Create Makefile
vlkale Dec 15, 2022
bfb4794
Delete profiling/vtune-connector/MakefileCXX=icpc CXXFLAGS=-O3 -std=c…
vlkale Dec 15, 2022
c1f8f28
Create Makefile
vlkale Dec 15, 2022
6837a70
Create Makefile
vlkale Dec 15, 2022
4b15ac7
Create Makefile
vlkale Dec 15, 2022
fb56375
Create Makefile
vlkale Dec 15, 2022
952eff6
Put in build instructions
vlkale Dec 16, 2022
65893dd
Merge pull request #8 from vlkale/vlkale-Patch-cmake-buildsys-with-Ma…
vlkale Dec 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "tpls/Caliper"]
path = tpls/Caliper
url = https://github.com/NexGenAnalytics/Caliper.git
branch = feature/make-multitool-safe # Until Caliper gets full support for Kokkos EventSet
[submodule "tpls/apex"]
path = tpls/apex
url = https://github.com/NexGenAnalytics/apex.git
branch = develop
22 changes: 22 additions & 0 deletions Build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# How to Build

# With Cmake

1. Create your build directory and go to it

2. Type `ccmake ..` and change any options, including tools you want turned on (some are by default off). (Optional)

3. Type `cmake ..`

4. Type `make`

5. Specify the generated .dylib file in the environment variable KOKKOS_TOOLS_LIBRARY when running your Kokkos-based application.


# With Makefile (recommended)

1. Go into the directory of the particular tool, e.g., `cd debugging/kernel_logger`

2. Type `make`

3. Specify the generated .so file in the environment variable KOKKOS_TOOLS_LIBRARY when running your Kokkos-based application.
227 changes: 227 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

project(KokkosTools CXX)

# Include utilities
include(cmake/utils.cmake)
include(cmake/configure_tpls.cmake)

# Set policies
cmake_policy(SET CMP0111 NEW) # error if library not found

# Disable in-source builds to prevent source tree corruption.
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "FATAL: In-source builds are not allowed. You should create a separate directory for build files.")
endif()

list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake)

message(STATUS)
message(STATUS Configuring Kokkos-Tools)
message(STATUS)

# Common settings
set(BUILD_SHARED_LIBS "Build shared libraries" ON)
if(WIN32)
set(BUILD_SHARED_LIBS OFF) # We need to add __declspec(dllexport/dllimport) for Windows DLLs
endif()

# Tools settings
option(KokkosTools_ENABLE_SINGLE "Build single library interfacing all profilers and dispatching at runtime" OFF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we discuss that name "single"? I suppose we can revisit later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we discussed but yeah I agree we can revisit. MONOLITHIC might be another option? Or do it the other way around and name the option KokkosTools_ENABLE_SEPARATE_LIBS or so, which by default is ON?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using KokkosTools_ENABLE_MONOLITHIC makes most sense to me, JM2C.

if(WIN32)
set(KokkosTools_ENABLE_SINGLE ON)
endif()

option(KokkosTools_ENABLE_PAPI "Enable PAPI support" OFF)
option(KokkosTools_ENABLE_MPI "Enable MPI support" OFF)
option(KokkosTools_ENABLE_CALIPER "Enable building Caliper library" OFF)
option(KokkosTools_ENABLE_APEX "Enable building Apex library" OFF)
option(KokkosTools_ENABLE_EXAMPLES "Build examples" OFF)
# Advanced settings
option(KokkosTools_REUSE_KOKKOS_COMPILER "Set the compiler and flags based on installed Kokkos settings" OFF)
mark_as_advanced(KokkosTools_REUSE_KOKKOS_COMPILER)

# Fetch Kokkos options:
acquire_kokkos_config()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is this useful/desirable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used for stuff like the connector tools to find the same CUDA library? Also there is some tools which have their own "ENABLE_CUDA" etc. e.g. the nvprof thing enabling is based on Kokkos_ENABLE_CUDA, and APEX use of CUPTI is based on the Kokkos option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, I will dig in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The acquire_kokkos_config() is used to show/print the kokkos configuration to the user, and to potentially set underlying (e.g.,CUPTI) tools options (e.g., ENABLE_CUDA).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any connector tools right now making use of this from a quick look. I am leaving this line in for now.

if(DEFINED Kokkos_FOUND_MSG)
message(STATUS "${Kokkos_FOUND_MSG}: ${Kokkos_INSTALL_DIR}\n"
"\t\tDevices: ${Kokkos_DEVICES}\n"
"\t\tArchitecture: ${Kokkos_ARCH}\n"
"\t\tTPLs: ${Kokkos_TPLS}\n"
"\t\tCompiler: ${Kokkos_CXX_COMPILER} (${Kokkos_CXX_COMPILER_ID})\n"
"\t\tCMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n"
"\t\tOptions: ${Kokkos_OPTIONS}")
# Synchronize compiler and flags (only when explicitly requested)
if(KokkosTools_REUSE_KOKKOS_COMPILER)
set(CMAKE_CXX_COMPILER "${Kokkos_CXX_COMPILER}" CACHE STRING "C++ Compiler")
set(CMAKE_CXX_STANDARD "${CMAKE_CXX_STANDARD_DEFAULT}" CACHE STRING "C++ Standard: 98, 11, 14, 17, 20 or 23")
endif()
else()
if(KokkosTools_REUSE_KOKKOS_COMPILER)
message(FATAL_ERROR "Kokkos not found: can't reuse Kokkos compiler (which was explicitly"
"requested with KokkosTools_REUSE_KOKKOS_COMPILER=ON)")
endif()
message(STATUS "Kokkos NOT found")
endif()

# Libraries
if(KokkosTools_ENABLE_PAPI)
find_package(PAPI REQUIRED) # TODO: papi-connector requires v6.0 or newer
cmake_path(GET PAPI_INCLUDE_DIR PARENT_PATH PAPI_ROOT)
message(STATUS "Found PAPI ${PAPI_VERSION_STRING} at ${PAPI_ROOT}")
set(KokkosTools_HAS_PAPI ON)
else()
message(STATUS "PAPI support disabled")
set(KokkosTools_HAS_PAPI OFF)
endif()

if(KokkosTools_ENABLE_MPI)
find_package(MPI REQUIRED)
message(STATUS "Found MPI ${MPI_CXX_VERSION}: ${MPI_CXX_LIBRARIES}")
set(KOKKOSTOOLS_HAS_MPI 1)
else()
message(STATUS "MPI not available. MPI disabled.")
set(KOKKOSTOOLS_HAS_MPI 0)
endif()

include(cmake/configure_variorum.cmake)

set(KOKKOSTOOLS_HAS_CALIPER ${KokkosTools_ENABLE_CALIPER})
set(KOKKOSTOOLS_HAS_NVPROF ${Kokkos_ENABLE_CUDA}) # we assume that enabling CUDA for Kokkos program means nvprof should be available

if(DEFINED ENV{VTUNE_HOME})
set(VTune_ROOT $ENV{VTUNE_HOME})
endif()
if(VTune_ROOT)
find_package(ITT REQUIRED)
set(KOKKOSTOOLS_HAS_VTUNE ON)
else()
message(WARNING "Set VTUNE_HOME in environment or VTune_ROOT in build options to build VTune connectors")
set(VTune_ROOT "" CACHE STRING "Path to VTune Intel compiler")
set(KOKKOSTOOLS_HAS_VTUNE OFF)
endif()

# make Kokkos profiling interface available for native profilers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/profiling/all)

# Config file
configure_file(common/kp_config.hpp.in common/kp_config.hpp)
set(COMMON_HEADERS_PATH ${CMAKE_CURRENT_BINARY_DIR}/common)
include_directories(${COMMON_HEADERS_PATH})

set(SINGLELIB_PROFILERS "" CACHE STRING "" FORCE)

# Export settings
include(GNUInstallDirs)
set(EXPORT_NAME KokkosToolsConfig)
set(EXPORT_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(EXPORT_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
set(EXPORT_TARGETS "" CACHE STRING "" FORCE)

if(WIN32)
message(STATUS "Windows target detected - skipping Unix-only tools.")
endif()

if(APPLE)
message(STATUS "Apple OSX target detected.")
endif()

# Utilities
if(NOT WIN32)
add_subdirectory(common/kernel-filter)
endif()
add_subdirectory(debugging/kernel-logger)

# Profilers
if(NOT WIN32)
add_subdirectory(profiling/simple-kernel-timer)
add_subdirectory(profiling/memory-hwm)
if(KOKKOSTOOLS_USE_MPI)
add_subdirectory(profiling/memory-hwm-mpi)
else()
message(STATUS "Skipping memory-hwm-mpi (MPI disabled)")
endif()
add_subdirectory(profiling/memory-events)
add_subdirectory(profiling/memory-usage)
add_subdirectory(profiling/chrome-tracing)
add_subdirectory(profiling/space-time-stack)
endif()

# External lib connectors
if(KokkosTools_ENABLE_PAPI)
add_subdirectory(profiling/papi-connector)
endif()

if(NOT WIN32 AND NOT APPLE)
add_subdirectory(profiling/systemtap-connector)
endif()

if(KOKKOSTOOLS_HAS_VARIORUM)
add_subdirectory(profiling/variorum-connector)
endif()

# GPU profilers
if(Kokkos_ENABLE_CUDA)
add_subdirectory(profiling/nvprof-connector)
add_subdirectory(profiling/nvprof-focused-connector)
endif()
if(KOKKOS_ENABLE_HIP)
#add_subdirectory(profiling/roctx-connector)
endif()

if(KOKKOSTOOLS_HAS_VTUNE)
add_subdirectory(profiling/vtune-connector)
add_subdirectory(profiling/vtune-focused-connector)
endif()

# Find or build Caliper
if(KokkosTools_ENABLE_CALIPER)
find_package(caliper QUIET)
if(caliper_INCLUDE_DIR)
cmake_path(GET caliper_INCLUDE_DIR PARENT_PATH Caliper_INSTALL_DIR)
file(REAL_PATH ${Caliper_INSTALL_DIR} Caliper_INSTALL_DIR)
message(STATUS "Caliper installation found in: ${Caliper_INSTALL_DIR}")
list(APPEND SINGLELIB_PROFILERS caliper)
else()
# Don't support git submodules for Caliper. The Kokkos tools user has can try installing Apex and linking on their own if they don't have it.
message(FATAL_ERROR "FATAL: Required Caliper installation not found! Exiting.")
endif()
endif()

# Find or build Apex
if(KokkosTools_ENABLE_APEX)
find_package(Apex QUIET)
if(Apex_FOUND)
message(STATUS "Apex installation found in: ${Apex_DIR}")
list(APPEND SINGLELIB_PROFILERS "apex")
else()
# Don't support git submodules for apex. The Kokkos tools user has can try installing Apex and linking on their own if they don't have it.
message(FATAL_ERROR "FATAL: Required Apex installation not found! Exiting.")
endif()
endif()

# Build single library interface (once we have everything set up)
if(KokkosTools_ENABLE_SINGLE)
message(STATUS "Building Monolithic KokkosTools library with profilers: ${SINGLELIB_PROFILERS}")
add_subdirectory(profiling/all)
else()
message(STATUS "Monolithic KokkosTools library skipped")
endif()

# Build examples
if(KokkosTools_ENABLE_EXAMPLES)
if(NOT KokkosTools_ENABLE_SINGLE)
message(WARNING "This example requires KokkosTools built with monolothic library interface (KokkosTools_ENABLE_SINGLE=ON)")
else()
enable_testing()
add_subdirectory(example)
endif()
endif()

# Install exports
install(TARGETS ${EXPORT_TARGETS} EXPORT ${EXPORT_NAME})
install(EXPORT ${EXPORT_NAME}
NAMESPACE KokkosTools::
DESTINATION ${EXPORT_LIB_DIR}/cmake)
install(CODE "SET(KokkosTools_HAS_MPI ${USE_MPI})")

34 changes: 34 additions & 0 deletions cmake/FindApex.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
find_package(PkgConfig REQUIRED)

# backup current CMAKE_PREFIX_PATH and PKG_CONFIG_USE_CMAKE_PREFIX_PATH
if(DEFINED CMAKE_PREFIX_PATH)
set(_old_def ON)
set(_old_val ${CMAKE_PREFIX_PATH})
else()
set(_old_def OFF)
endif()
set(_old_use ${PKG_CONFIG_USE_CMAKE_PREFIX_PATH})
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)

# add Apex_DIR / Apex_ROOT to module search path
if(Apex_DIR)
set(CMAKE_PREFIX_PATH ${Apex_DIR})
elseif(Apex_ROOT)
set(CMAKE_PREFIX_PATH ${Apex_ROOT})
endif()

# find Apex
pkg_check_modules(Apex QUIET IMPORTED_TARGET apex)
if(Apex_FOUND)
# create "apex" target like it would be created by Apex setup
add_library(apex ALIAS PkgConfig::Apex)
file(REAL_PATH ${Apex_PREFIX} Apex_DIR)
endif()

# restore original variables
if(_old_def)
set(CMAKE_PREFIX_PATH ${_old_val})
else()
unset(CMAKE_PREFIX_PATH)
endif()
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ${_old_use})
57 changes: 57 additions & 0 deletions cmake/FindITT.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Note: Package is named "ITT" here because we reuse Caliper's FindITTAPI.cmake find module
# and it calls find_package_handle_standard_args() with "ITT" package name internally, so CMake
# expectes find_package() calles to use "ITT" package name as well.

function(is_architecture_x64 OUT_ARCH64)
# heuristic to catch x86_64 on Unix and AMD64 on Windows
string(REGEX MATCH "64$" ARCH64 ${CMAKE_SYSTEM_PROCESSOR})
if(${ARCH64} STREQUAL "64")
set(${OUT_ARCH64} ON PARENT_SCOPE)
else()
set(${OUT_ARCH64} OFF PARENT_SCOPE)
endif()
endfunction()

#--------------------------------------------------------------------------------#
# 2022-02-14 On some x64 platforms (encountered on Ubuntu 20.04 in Win11/WSL2)
# CMake does NOT enable FIND_LIBRARY_USE_LIB64_PATHS as it should, which leads to
# Intel oneAPI libs not being found in .../lib64 folders.
# See: https://cmake.org/cmake/help/latest/command/find_library.html
get_property(USE_LIB32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
get_property(USE_LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
is_architecture_x64(ARCH64)
if(ARCH64 AND NOT USE_LIB32)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
elseif(NOT USE_LIB64)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS ON)
endif()
#--------------------------------------------------------------------------------#

if(MSVC)

# 2022-02-14: find_library() can't locate libittnotify.lib on Windows - not sure why...
# using find_file() instead as a workaround
get_property(USE_LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
if(USE_LIB64)
find_file(ITT_LIBRARY libittnotify.lib ${VTune_ROOT}/lib64)
else()
find_file(ITT_LIBRARY libittnotify.lib ${VTune_ROOT}/lib32)
endif()
find_path(ITT_INCLUDE_DIR NAMES ittnotify.h HINTS ${VTune_ROOT}/include)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ITT DEFAULT_MSG ITT_LIBRARY ITT_INCLUDE_DIR)

else()

# Just reuse find module implemented in Caliper
set(ITT_PREFIX ${VTune_ROOT})
include(${PROJECT_SOURCE_DIR}/tpls/Caliper/cmake/FindITTAPI.cmake)

endif()

# Set up imported target
if(NOT TARGET ittapi) # Note: "ittnotify" is a target created by Apex
add_library(ittapi INTERFACE IMPORTED)
target_include_directories(ittapi INTERFACE ${ITT_INCLUDE_DIR})
target_link_libraries(ittapi INTERFACE ${ITT_LIBRARY})
endif()
Loading