-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (29 loc) · 898 Bytes
/
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
cmake_minimum_required(VERSION 2.8.7)
project(libdw_bpf)
include(cmake/GetGitRevisionDescription.cmake)
include(cmake/version.cmake)
include(CMakeDependentOption)
include(GNUInstallDirs)
include(CheckCXXCompilerFlag)
include(cmake/FindCompilerFlag.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(LibElf REQUIRED)
find_package(LibUnwind REQUIRED)
if (NOT CMAKE_VERSION VERSION_LESS 3.1)
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
else ()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
if (CMAKE_USE_PTHREADS_INIT)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread")
endif ()
endif ()
add_subdirectory(src)
add_subdirectory(examples)
add_subdirectory(tests)
add_subdirectory(cases)