-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (32 loc) · 1.41 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
cmake_minimum_required(VERSION 3.13)
project(hwcinstr)
enable_language(CXX)
find_package(PkgConfig REQUIRED)
find_package(LLVM CONFIG REQUIRED)
message(STATUS "LLVM: ${LLVM_PACKAGE_VERSION}")
message(STATUS "LLVM include dir: " ${LLVM_INCLUDE_DIR})
message(STATUS "LLVM lib dir: ${LLVM_LIBRARY_DIR}")
find_package(Clang CONFIG REQUIRED)
message(STATUS "clang include dir: ${CLANG_INCLUDE_DIRS}")
message(STATUS "clang lib dir: ${Clang_DIR}")
pkg_check_modules(PAPI papi REQUIRED)
message(STATUS "PAPI include dir: ${PAPI_INCLUDEDIR}")
message(STATUS "PAPI lib dir: ${PAPI_LIBDIR}")
pkg_check_modules(OPENSSL openssl REQUIRED)
message(STATUS "openssl include dir: ${OPENSSL_INCLUDEDIR}")
message(STATUS "openssl lib dir: ${OPENSSL_LIBDIR}")
pkg_check_modules(LIBYAML yaml-0.1 REQUIRED)
message(STATUS "libyaml include dir: ${LIBYAML_INCLUDEDIR}")
message(STATUS "libyaml lib dir; ${LIBYAML_LIBDIR}")
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_compile_options(-std=c++17 -Wall -Wextra -fPIC)
set(CMAKE_BUILD_RPATH ${LLVM_LIBRARY_DIR} ${PAPI_LIBDIR})
set(CMAKE_INSTALL_RPATH ${LLVM_LIBRARY_DIR} ${PAPI_LIBDIR})
set(CMAKE_PROJECT_BINDIR "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_PROJECT_LIBDIR "${PROJECT_BINARY_DIR}/lib")
# Determine the Clang and GCC executables to use
set(CLANG ${LLVM_TOOLS_BINARY_DIR}/clang)
set(CLANGXX ${LLVM_TOOLS_BINARY_DIR}/clang++)
add_subdirectory(cfe)
add_subdirectory(rt)
add_subdirectory(drivers)