diff options
author | Gordan Markuš <gordan.markus@pelagicore.com> | 2017-06-16 07:39:25 +0200 |
---|---|---|
committer | Christoph Lipka <clipka@users.noreply.github.com> | 2017-06-16 07:39:25 +0200 |
commit | 41c2edac3417dcfadc9805a2b98517a06be6eaf5 (patch) | |
tree | 1d9442e20a448ebd1f936d4285d67dea718e8ba1 | |
parent | cf65615d35b7c0d3cae3239c53374d841d9a175d (diff) | |
download | DLT-daemon-41c2edac3417dcfadc9805a2b98517a06be6eaf5.tar.gz |
cmake: fix unit tests compilation with systemd (#17)
By enabling the WITH_SYSTEMD and WITH_DLT_UNIT_TESTS cmake flags
the build will fail with an error due to a linking issue:
../src/daemon/libdlt_daemon.so: undefined reference to `sd_booted'
collect2: error: ld returned 1 exit status
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
-rw-r--r-- | src/daemon/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index cec9dc7..83d4302 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -32,7 +32,7 @@ install(TARGETS dlt-daemon COMPONENT base) if (WITH_DLT_UNIT_TESTS) - add_library(dlt_daemon ${dlt_daemon_SRCS}) + add_library(dlt_daemon ${dlt_daemon_SRCS} ${systemd_SRCS}) target_link_libraries(dlt_daemon rt ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS dlt_daemon RUNTIME DESTINATION bin |