File: CMakeLists.txt

package info (click to toggle)
process-cpp 3.0.1-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 588 kB
  • sloc: cpp: 2,546; ansic: 225; makefile: 4
file content (66 lines) | stat: -rw-r--r-- 1,907 bytes parent folder | download | duplicates (3)
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
# Copyright © 2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Authored by: Thomas Voss <thomas.voss@canonical.com>

add_library(
  process-cpp SHARED
  
  core/posix/backtrace.h
  core/posix/backtrace.cpp

  core/posix/child_process.cpp
  core/posix/exec.cpp
  core/posix/fork.cpp
  core/posix/process.cpp
  core/posix/process_group.cpp
  core/posix/signal.cpp
  core/posix/signalable.cpp
  core/posix/standard_stream.cpp
  core/posix/wait.cpp
  core/posix/this_process.cpp

  core/posix/linux/proc/process/oom_adj.cpp
  core/posix/linux/proc/process/oom_score.cpp
  core/posix/linux/proc/process/oom_score_adj.cpp
  core/posix/linux/proc/process/stat.cpp

  core/testing/cross_process_sync.cpp
  core/testing/fork_and_run.cpp
)

target_link_libraries(
  process-cpp

  ${Boost_LIBRARIES}
  ${CMAKE_THREAD_LIBS_INIT}
)

# We compile with all symbols visible by default. For the shipping library, we strip
# out all symbols that are not in core::*
set(symbol_map "${CMAKE_SOURCE_DIR}/symbols.map")
set_target_properties(
  process-cpp

  PROPERTIES
  LINK_FLAGS "${ldflags} -Wl,--version-script,${symbol_map}"
  LINK_DEPENDS ${symbol_map}
  VERSION ${PROCESS_CPP_VERSION_MAJOR}.${PROCESS_CPP_VERSION_MINOR}.${PROCESS_CPP_VERSION_PATCH}
  SOVERSION ${PROCESS_CPP_VERSION_MAJOR}
)

install(
  TARGETS process-cpp
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)