forked from bloomberg/clangmetatool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
81 lines (72 loc) · 1.96 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
cmake_minimum_required(VERSION 3.6)
project(clangmetatool CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Clang REQUIRED)
add_library(
clangmetatool
src/collectors/definitions.cpp
src/collectors/find_calls.cpp
src/collectors/find_cxx_member_calls.cpp
src/collectors/include_graph/find_decl_match_callback.cpp
src/collectors/include_graph/find_decl_ref_match_callback.cpp
src/collectors/include_graph/find_type_match_callback.cpp
src/collectors/include_graph/include_finder.cpp
src/collectors/include_graph/include_graph.cpp
src/collectors/include_graph/include_graph_util.cpp
src/collectors/member_method_decls.cpp
src/collectors/references.cpp
src/collectors/variable_refs.cpp
src/propagation/constant_cstring_propagator.cpp
src/propagation/constant_integer_propagator.cpp
src/propagation/strongly_connected_blocks.cpp
src/propagation/types/value_context_ordering.cpp
src/propagation/util/get_stmt_from_cfg_element.cpp
)
target_include_directories(
clangmetatool
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${LLVM_INCLUDE_DIR}>
)
target_include_directories(
clangmetatool
SYSTEM PRIVATE
${CLANG_INCLUDE_DIRS}
)
target_link_libraries(
clangmetatool
clangTooling
)
install(
TARGETS clangmetatool EXPORT clangmetatool
LIBRARY DESTINATION ${LLVM_LIBRARY_DIR}
ARCHIVE DESTINATION ${LLVM_LIBRARY_DIR}
PUBLIC_HEADER DESTINATION ${LLVM_INCLUDE_DIR}
)
install(
DIRECTORY include/
DESTINATION ${LLVM_INCLUDE_DIR}
)
install(
EXPORT clangmetatool
DESTINATION ${CLANG_CMAKE_DIR}
)
install(
FILES
cmake/clangmetatool-find-clang-include-dir.pl
DESTINATION ${CLANG_CMAKE_DIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(
FILES
cmake/clangmetatool-config.cmake
DESTINATION ${CLANG_CMAKE_DIR}
)
enable_testing()
if (NOT GTEST_IS_INCOMPATIBLE)
add_subdirectory(t)
endif()