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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
# 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>
#set(GMOCK_BUILD_SHARED_LIBS ON)
find_package(GMock)
include_directories(
${CMAKE_SOURCE_DIR}/src
${GTEST_INCLUDE_DIRS}
)
add_executable(
posix_process_test
posix_process_test.cpp
)
add_executable(
linux_process_test
linux_process_test.cpp
)
add_executable(
fork_and_run_test
fork_and_run_test.cpp
# We include an external source file to prevent from leaking
# symbols to the outside world
${CMAKE_SOURCE_DIR}/src/core/posix/backtrace.cpp
)
add_executable(
cross_process_sync_test
cross_process_sync_test.cpp
)
add_executable(
death_observer_test
death_observer_test.cpp
)
target_link_libraries(
posix_process_test
process-cpp
${CMAKE_THREAD_LIBS_INIT}
${GTEST_BOTH_LIBRARIES}
${GMOCK_LIBRARIES}
)
target_link_libraries(
linux_process_test
process-cpp
${CMAKE_THREAD_LIBS_INIT}
${GTEST_BOTH_LIBRARIES}
)
target_link_libraries(
fork_and_run_test
process-cpp
${CMAKE_THREAD_LIBS_INIT}
${GTEST_BOTH_LIBRARIES}
)
target_link_libraries(
cross_process_sync_test
process-cpp
${CMAKE_THREAD_LIBS_INIT}
${GTEST_BOTH_LIBRARIES}
)
target_link_libraries(
death_observer_test
process-cpp
${CMAKE_THREAD_LIBS_INIT}
${GTEST_BOTH_LIBRARIES}
)
add_test(posix_process_test ${CMAKE_CURRENT_BINARY_DIR}/posix_process_test)
add_test(linux_process_test ${CMAKE_CURRENT_BINARY_DIR}/linux_process_test)
add_test(fork_and_run_test ${CMAKE_CURRENT_BINARY_DIR}/fork_and_run_test)
add_test(cross_process_sync_test ${CMAKE_CURRENT_BINARY_DIR}/cross_process_sync_test)
add_test(death_observer_test ${CMAKE_CURRENT_BINARY_DIR}/death_observer_test)
|