Skip to content

Commit

Permalink
ittnotify: use untouched library
Browse files Browse the repository at this point in the history
  • Loading branch information
clementperon committed Jul 24, 2024
1 parent fd3960d commit 38c23bb
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 8,773 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ if (TBB_FIND_PACKAGE AND TBB_DIR)
find_package(TBB REQUIRED)
else()
if (TBB_BUILD)
add_subdirectory(src/ittapi)
add_subdirectory(src/tbb)
endif()
if (TBBMALLOC_BUILD)
Expand Down
21 changes: 21 additions & 0 deletions src/ittapi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
include(FetchContent)

# Fetch the ittapi library if it doesn't exist
if(NOT TARGET ittapi::ittnotify)
FetchContent_Declare(
ittapi
# https://github.com/intel/ittapi/archive/refs/tags/v3.25.1.tar.gz
URL ${CMAKE_CURRENT_SOURCE_DIR}/ittapi-3.25.1.tar.gz
URL_HASH
SHA256=866a5a75a287a7440760146f99bd1093750c3fb5bf572c3bff2d4795628ebc7c
)
FetchContent_MakeAvailable(ittapi)
add_library(ittapi::ittnotify ALIAS ittnotify)
endif()

if(NOT TARGET ittapi::ittnotify)
message(
ERROR
"Failed to add Intel® Instrumentation and Tracing Technology (ITT) library"
)
endif()
Binary file added src/ittapi/ittapi-3.25.1.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions src/tbb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ endif()

target_link_libraries(tbb
PRIVATE
ittapi::ittnotify
Threads::Threads
${TBB_LIB_LINK_LIBS}
${TBB_COMMON_LINK_LIBS}
Expand Down
2 changes: 0 additions & 2 deletions src/tbb/itt_notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ extern "C" void MallocInitializeITT();
#error This file is expected to be used for either TBB or TBB allocator build.
#endif // __TBB_BUILD

#include "tools_api/ittnotify_static.c"

namespace tbb {
namespace detail {
namespace r1 {
Expand Down
4 changes: 2 additions & 2 deletions src/tbb/itt_notify.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#define INTEL_ITTNOTIFY_API_PRIVATE
#endif

#include "tools_api/ittnotify.h"
#include "tools_api/legacy/ittnotify.h"
#include "ittnotify.h"
#include "legacy/ittnotify.h"
extern "C" void __itt_fini_ittlib(void);
extern "C" void __itt_release_resources(void);

Expand Down
39 changes: 0 additions & 39 deletions src/tbb/tools_api/disable_warnings.h

This file was deleted.

Loading

0 comments on commit 38c23bb

Please sign in to comment.