summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSaya Sugiura <ssugiura@jp.adit-jv.com>2020-02-11 10:24:39 +0900
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commit404bc3934bcb0bbb5671a84ecb45c95069bc1ab3 (patch)
treefb419eea29e1d8dc99dfdf7f5e6762aaf1934e01 /CMakeLists.txt
parent3dca373d843213f03c95df56e36b16d6b83fd58f (diff)
downloadDLT-daemon-404bc3934bcb0bbb5671a84ecb45c95069bc1ab3.tar.gz
network trace: Add mqueue verification
There is some OS (e.g. Android) which doesn't support message queue. Since network trace uses it as IPC, we need to disable it if following calls are not available: mq_open, mq_close, mq_unlink, mq_send, mq_receive Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfc9058..a9c40cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,6 +182,14 @@ add_definitions(-DCONFIGURATION_FILES_DIR="${CONFIGURATION_FILES_DIR}")
add_subdirectory(cmake)
+# Message queue
+if(HAVE_MQUEUE_H AND HAVE_FUNC_MQOPEN AND HAVE_FUNC_MQCLOSE AND
+ HAVE_FUNC_MQUNLINK AND HAVE_FUNC_MQSEND AND HAVE_FUNC_MQRECEIVE)
+ add_definitions(-DDLT_NETWORK_TRACE_ENABLE)
+else()
+ message(STATUS "Disable network trace interface since message queue is not supported")
+endif()
+
if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL)
find_package(PkgConfig REQUIRED)
execute_process(COMMAND pkg-config --modversion systemd OUTPUT_VARIABLE SYSTEMD_VERSION)