summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>2023-05-17 09:48:15 +0200
committerGitHub <noreply@github.com>2023-05-17 09:48:15 +0200
commit478ddcdbd3110952510ab3c4f9618da5860018a2 (patch)
treec4a2d2a0a99d9dd7033abbd9dd0e342e6ce43a63
parentf64063bf1dff1f05f95b11d4571ad6416faa81ae (diff)
downloadDLT-daemon-master.tar.gz
Update CMakeLists.txt (#482)HEADmaster
* Update CMakeLists.txt Link systemd libraries, to avoid underlinking of tests with -DWITH_SYSTEMD_SOCKET_ACTIVATION=ON [ 82%] Linking CXX executable gtest_dlt_daemon_gateway cd dlt-daemon-2.18.9/obj-x86_64-linux-gnu/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/gtest_dlt_daemon_gateway.dir/link.txt --verbose=1 /usr/bin/c++ -g -O2 -ffile-prefix-map=dlt-daemon-2.18.9=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /include -std=gnu++0x -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -rdynamic CMakeFiles/gtest_dlt_daemon_gateway.dir/gtest_dlt_daemon_gateway.cpp.o CMakeFiles/gtest_dlt_daemon_gateway.dir/__/systemd/3rdparty/sd-daemon.c.o -o gtest_dlt_daemon_gateway -Wl,-rpath,dlt-daemon-2.18.9/obj-x86_64-linux-gnu/src/daemon ../src/daemon/libdlt_daemon.so /usr/lib/x86_64-linux-gnu/libgtest.a /usr/lib/x86_64-linux-gnu/libgtest_main.a -lrt /usr/lib/x86_64-linux-gnu/libgtest.a /usr/bin/ld: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_listen_fds_with_names' * Add systemd libs for WITH_SYSTEMD as well and removed deprecated versions Signed-off-by: Michael Methner <mmethner@de.adit-jv.com> --------- Signed-off-by: Michael Methner <mmethner@de.adit-jv.com> Co-authored-by: Michael Methner <mmethner@de.adit-jv.com>
-rw-r--r--tests/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 579d730..d627ed2 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -21,8 +21,12 @@ else()
set(LIBRARIES socket)
endif()
+if(WITH_SYSTEMD)
+ set(SYSTEMD_LIBS systemd)
+endif(WITH_SYSTEMD)
+
set(DLT_LIBRARIES dlt ${GTEST_LIBS} ${LIBRARIES})
-set(DLT_DAEMON_LIBRARIES dlt_daemon ${GTEST_LIBS} ${LIBRARIES})
+set(DLT_DAEMON_LIBRARIES dlt_daemon ${GTEST_LIBS} ${LIBRARIES} ${SYSTEMD_LIBS})
set(DLT_CONTROL_LIBRARIES dlt dlt_control_common_lib ${GTEST_LIBS})
#Receiver used for QTs. add_test() is not required