-
Notifications
You must be signed in to change notification settings - Fork 56
/
CMakeLists.txt
43 lines (33 loc) · 1.21 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
include("../../build_utils/CMakeLists.txt")
SetRequiredCMakeVersion()
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
project(PTI_Samples_OpenCL_Debug_Info CXX)
SetCompilerFlags()
SetBuildType()
# Tool Library
add_library(clt_debug_info SHARED "${PROJECT_SOURCE_DIR}/../../loader/init.cc" tool.cc)
target_include_directories(clt_debug_info
PRIVATE "${PROJECT_SOURCE_DIR}/../../utils")
if(CMAKE_INCLUDE_PATH)
target_include_directories(clt_debug_info
PUBLIC "${CMAKE_INCLUDE_PATH}")
endif()
add_subdirectory("${PTI_CMAKE_MACRO_DIR}/../utils/gpu_elf_parser" debug_info_parser)
FindPtiElfParserHeaders(clt_debug_info)
target_link_libraries(clt_debug_info debug_info_parser)
FindOpenCLLibrary(clt_debug_info)
FindOpenCLHeaders(clt_debug_info)
GetOpenCLTracingHeaders(clt_debug_info)
FindIGALibrary(clt_debug_info)
GetIGAHeaders(clt_debug_info)
GetIGCHeaders(clt_debug_info)
GetGmmHeaders(clt_debug_info)
# Loader
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOOL_NAME=clt_debug_info")
add_executable(cl_debug_info "${PROJECT_SOURCE_DIR}/../../loader/loader.cc")
target_include_directories(cl_debug_info
PRIVATE "${PROJECT_SOURCE_DIR}/../../utils")
if(UNIX)
target_link_libraries(cl_debug_info
dl)
endif()