Test suite builds on amd-64/linux
[dyninst.git] / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2 project (Dyninst)
3
4 set (SOVERSION "8.1")
5 set (LIBVERSION "8.1.1")
6
7 if (UNIX)
8 enable_language(ASM-ATT)
9 endif()
10
11 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules")
12 include (cmake/platform.cmake)
13 include (cmake/packages.cmake)
14 include (cmake/cap_arch_def.cmake)
15 include (cmake/c++11.cmake)
16 include (cmake/warnings.cmake)
17 include (cmake/options.cmake)
18
19 set (BUILD_SHARED_LIBS ON)
20
21 include_directories (
22                     ${PROJECT_SOURCE_DIR}
23                     ${PROJECT_SOURCE_DIR}/external
24   )
25
26 set (HEADER_DIRS dataflowAPI
27                  dwarf
28                  dyninstAPI
29                  dyninstAPI_RT
30                  dynutil
31                  elf
32                  instructionAPI
33                  parseAPI
34                  patchAPI
35                  proccontrol
36                  stackwalk
37                  symlite
38                  symtabAPI
39     )
40
41 foreach (dir ${HEADER_DIRS})
42   include_directories ( ${PROJECT_SOURCE_DIR}/${dir}/h )
43 endforeach()
44
45 # Component time
46 add_subdirectory (dynutil)
47 add_subdirectory (common)
48 add_subdirectory (elf)
49 add_subdirectory (dwarf)
50 add_subdirectory (instructionAPI)
51 add_subdirectory (symtabAPI)
52 add_subdirectory (symlite)
53 add_subdirectory (parseAPI)
54 add_subdirectory (patchAPI)
55 add_subdirectory (proccontrol)
56 add_subdirectory (stackwalk)
57 add_subdirectory (dyninstAPI)
58 add_subdirectory (dyninstAPI_RT)
59
60 SET_TARGET_PROPERTIES (
61    common dynElf dynDwarf instructionAPI symtabAPI symLite parseAPI
62    patchAPI pcontrol stackwalker dyninstAPI dyninstAPI_RT
63    PROPERTIES
64      SOVERSION ${SOVERSION}
65      VERSION ${LIBVERSION}
66 )
67
68 # RTlib properties are set in its CMakeLists.txt; it seems
69 # like multiple set_target_properties calls override instead
70 # of accumulating
71
72 add_subdirectory(testsuite/${PLATFORM})