forked from intel/pti-gpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (35 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
include("../../build_utils/CMakeLists.txt")
SetRequiredCMakeVersion()
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
project(PTI_Samples_CL_Tracer CXX)
SetCompilerFlags()
SetBuildType()
# Tool Library
add_library(clt_tracer SHARED
"${PROJECT_SOURCE_DIR}/../../loader/init.cc"
"${PROJECT_SOURCE_DIR}/../utils/correlator.cc"
"${PROJECT_SOURCE_DIR}/../../utils/trace_guard.cc"
cl_ext_collector.cc
tool.cc)
target_include_directories(clt_tracer
PRIVATE "${PROJECT_SOURCE_DIR}"
PRIVATE "${PROJECT_SOURCE_DIR}/../utils"
PRIVATE "${PROJECT_SOURCE_DIR}/../../utils")
if(CMAKE_INCLUDE_PATH)
target_include_directories(clt_tracer
PUBLIC "${CMAKE_INCLUDE_PATH}")
endif()
FindOpenCLLibrary(clt_tracer)
FindOpenCLHeaders(clt_tracer)
GetOpenCLTracingHeaders(clt_tracer)
# Loader
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOOL_NAME=clt_tracer")
add_executable(cl_tracer "${PROJECT_SOURCE_DIR}/../../loader/loader.cc")
target_include_directories(cl_tracer
PRIVATE "${PROJECT_SOURCE_DIR}/../../utils")
if(UNIX)
target_link_libraries(cl_tracer
dl)
endif()
# Installation
install(TARGETS cl_tracer clt_tracer DESTINATION bin)