/
CMakeLists.txt
50 lines (40 loc) · 959 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
set(SRC_DIR "src")
set(CPPANALYZE_SRC
${SRC_DIR}/cppanalyze.cpp
)
set(CPPANALYZE_HEADERS
${SRC_DIR}/rename_consumer.h
)
add_library(cppanalyze SHARED
${CPPANALYZE_SRC}
${CPPANALYZE_HEADERS}
)
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
)