Fix writable string warning
[dyninst.git] / proccontrol / CMakeLists.txt
1 # CMake configuration for proccontrol directory
2
3 include_directories (
4   src
5   h
6   )
7
8 set (SRC_LIST
9      src/event.C 
10      src/generator.C 
11      src/handler.C 
12      src/mailbox.C 
13      src/process.C 
14      src/pcerrors.C 
15      src/procpool.C 
16      src/irpc.C 
17      src/response.C 
18          src/resp.C
19      src/memcache.C 
20      src/procset.C 
21      src/processplat.C 
22      src/loadLibrary/injector.C 
23      src/loadLibrary/codegen.C 
24      src/loadLibrary/codegen-x86.C
25      src/loadLibrary/codegen-ppc.C 
26          src/loadLibrary/codegen-aarch64.C
27      src/x86_process.C 
28      src/ppc_process.C 
29          src/arm_process.C
30      src/pcmachsyscall.C
31  )
32 if(UNIX)
33 set (SRC_LIST ${SRC_LIST}
34      src/sysv.C 
35      src/int_thread_db.C 
36      src/mmapalloc.C 
37 )
38 elseif(WIN32)
39 set (SRC_LIST ${SRC_LIST}
40         src/GeneratorWindows.C
41         src/DecoderWindows.C
42         src/windows_handler.C
43         src/windows_process.C
44         src/windows_thread.C
45         src/loadLibrary/codegen-win.C
46      ../common/src/dthread-win.C
47          ../common/src/dthread.C
48 )
49 endif()
50
51 if (PLATFORM MATCHES freebsd)
52 set (SRC_LIST ${SRC_LIST}
53      src/freebsd.C
54      src/unix.C
55      src/notify_pipe.C
56      ../common/src/dthread-unix.C
57          ../common/src/dthread.C
58      src/loadLibrary/codegen-freebsd.C
59   )
60 elseif (PLATFORM MATCHES linux)
61 set (SRC_LIST ${SRC_LIST}
62      src/linux.C
63      src/unix.C
64      src/notify_pipe.C
65      ../common/src/dthread-unix.C
66          ../common/src/dthread.C
67      src/loadLibrary/codegen-linux.C
68   )
69 elseif (PLATFORM MATCHES bgq)
70 set (SRC_LIST ${SRC_LIST}
71      src/bluegeneq.C
72      src/bgq-messages.C
73      src/notify_pipe.C
74      ../common/src/dthread-unix.C
75          ../common/src/dthread.C
76      src/loadLibrary/codegen-linux.C
77   )
78 elseif (PLATFORM MATCHES cnl)
79 set (SRC_LIST ${SRC_LIST}
80      src/linux.C
81      src/unix.C
82      src/notify_pipe.C
83      ../common/src/dthread-unix.C
84          ../common/src/dthread.C
85      src/loadLibrary/codegen-stub.C
86   )
87 endif()
88
89 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
90
91 ADD_DEFINITIONS(-DPROCCONTROL_EXPORTS)
92
93 set (DEPS common ${SYMREADER})
94
95 dyninst_library(pcontrol ${DEPS})
96
97 target_link_private_libraries(pcontrol ${CMAKE_DL_LIBS})
98 target_link_private_libraries(pcontrol ${Boost_LIBRARIES})
99
100 if (UNIX)
101 # Boost auto-links on Windows; don't double-link
102 target_link_private_libraries(pcontrol pthread)
103 endif()
104 if (USE_COTIRE)
105     cotire(pcontrol)
106 endif()
107