summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* build: add static lib only if necessary (#479)Alexander Mohr2023-05-171-0/+6
| | | | | | | | | adding static library should only be enabled if the dlt library is build static. Adding this to the automotive-dlt.pc.in when static libraries are disabled yocto build will break Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* dlt_user_shared: Add timeout to writev (#385)Alexander Mohr2023-05-171-0/+4
| | | | | | | | | | | | This timeout is necessary to prevent blocking writev indefinitely. Without the timeout dlt-daemon, may block indefinitely when an app id is re-used very frequently. In that case dlt-daemon won't accept anymore new connections and further communication in any way is not possible anymore. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* cmake: set version to 2.18.9 (#478)Alexander Mohr2023-05-051-1/+1
| | | | | | this version will be used to create filenames etc and should reflect the current version Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* logstorage: Adds option to write logs in gzip format (#442)Linus Probert2023-04-191-1/+10
| | | | | | | | | | * logstorage: Adds option to write logs in gzip format Adds functionality to allow storing offline logs in gzipped files instead of standard dlt files. * Ensure tests run safely with or without GZIP compression enabled * Enforce minimum version of zlib if enabling gzip compression
* cmake: remove duplicated option message (#454)Minh Quang Luu2023-03-221-1/+0
| | | Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
* cmake: network trace enable toggle (#424)Daniel Weber2022-11-301-6/+12
| | | | | Add cmake toggle to disable network trace. Signed-off-by: Daniel Weber <daniel.w.weber@mercedes-benz.com>
* internal-logging: Fix issues with file logging (#378)Alexander Mohr2022-10-051-0/+6
| | | | | | | | | | | | | This commit fixes the following issues if access to the internal log file is not possible (logging_mode = DLT_LOG_TO_FILE) * dlt_log_free tried to call fclose on a nullptr Added a nullcheck for this * Access to log file might be denied but access to logs is still wanted Add a new CMake option WITH_DLT_FILE_LOGGING_SYSLOG_FALLBACK If this is set to ON and the logging moe is set to file, the dlt-daemon will fall back to syslog if opening the internal log file failed Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* systemd: add support for socket activation via systemd (#401)Alexander Mohr2022-10-051-1/+10
| | | | | | | | | | | dlt-daemon now support activation via systemd socket. This allows dlt-daemon to be started as soon as an application is requesting access to the dlt socket. This commits implements opening the socket only when UNIX_SOCKET is used for IPC Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com> Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
* Merge pull request #363 from alexmohr/make-console-tools-configurableBui Nguyen Quoc Thanh2022-05-101-0/+5
|\ | | | | cmake: Add options to enable/disable each dlt console tool
| * cmake: Add options to enable/disable each dlt console toolAlexander Mohr2022-01-251-0/+5
| | | | | | | | | | | | | | This commits adds several cmake options to enable or disable each console tool separately. Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
* | Issue-ID: make-adaptor-configurablecmake: Add option to enable each adaptor ↵Alexander Mohr2022-05-091-1/+5
|/ | | | | | | | | | by itself This commit adds two options to enable the udp and stdin adaptor indendent from each other. Therefore only the necessary component can be enabled Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
* Update ReleaseNotes and version to v2.18.8v2.18.8Saya Sugiura2021-10-051-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cmake: Set empty to systemd_SRCSSaya Sugiura2021-10-051-0/+2
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cmake: Correct added subdirectoriesSaya Sugiura2021-10-051-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* console: Add cmake options for control and timestampSaya Sugiura2021-10-051-0/+4
| | | | | | | | | | Following cmake options are introduced in order to build and install only minimum sets from src/console - WITH_DLT_CONSOLE_WO_CTRL: Set to ON not to build control commands under src/console (Default OFF) - WITH_DLT_CONSOLE_WO_SBTM: Set to ON not to build dlt-sortbytimestamp under src/console (Default OFF) Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* header: Adapt to DLT_DISABLE_MACROSaya Sugiura2021-10-051-4/+0
| | | | | | | | | If dlt.h is included in external application, it needed to include -DDLT_DISABLE_MACRO to make ifdef switch work. This commit adds DLT_DISABLE_MACRO in dlt_user.h so that no additional definition is needed in application. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* tests: Enable macro disablingSaya Sugiura2021-10-051-0/+6
| | | | | | | | | | This commit introduces new cmake option "WITH_DLT_DISABLE_MACRO" to disable macro usage in case it is not allowed. Currently this is adapted to src/tests and src/examples only. for dlt-test-non-verbose, the build itself is currently disabled if WITH_DLT_DISABLE_MACRO is set; this needs to be enabled again in future by replacing or adding function usage. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cmake: Set WITH_LEGACY_INCLUDE_PATH to ON as default (#334)Saya Sugiura2021-10-051-2/+1
| | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Make the legacy include path a CMake option (#332)Martin Willers2021-10-051-0/+3
| | | Signed-off-by: Martin Willers <M.Willers@gmx.net>
* Update ReleaseNotes and version to v2.18.7Saya Sugiura2021-06-301-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Do not use CpackBui Nguyen Quoc Thanh2021-06-301-6/+0
| | | | | | | - Remove CPACK from CMakeLists.txt - Update README.md Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Alternative solutions for json-c dependencyBiastoch, Darian (ADITG/ESM)2021-06-301-1/+1
| | | | | | | json-c dependency was removed from libdlt ('dlt_common') and shifted into 'dlt-control-common'. By this only the command line tools have a dependency on json-c. dlt-control-common is now built as a static library, so that it can be linked against json-c. Command line tools that included only the .c file of dlt-control-common before, are now linked against this static libarary (see console/CMakeLists.txt). Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
* dlt-receive: Enabled more filtering by using json filter filesdbiastoch2021-06-301-0/+21
| | | | | | | | | | | | | | | -Added '-j' flag to dlt-receive for reading a json filter file -Added more attributes to DltFilter (LogLevel, MaxPayload, MinPayload) for extended message filtering, when using old filters these values are set to default. Same behaviour, when they are not defined in json filter file. -extended dlt_common.c to support json filter files and new DltFilter attributes +add dlt_json_filter_load to parse a json filter file into a DltFilter +add dlt_json_filter_save to print a DltFilter into a json file -Two new libraries are used to parse the json filter files: json-c for Linux based systems and the QNX internal libjson for QNX systems -gtest_dlt_common was modified to test the new function 'dlt_json_filter_load' +add testfile_extended.dlt that contains a bigger varity of messages (different context/app IDs, lengths and log levels) +add testfilter.json which is a valid json filter file -New dependency on library was added to related CMakeLists and is described in README.md Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
* gtest: Find system-provided external gtest (#301)Gianfranco Costamagna2021-05-171-1/+5
| | | | Find system-provided external gtest in case a system version is available, without need to recompile the bundled version everytime
* Update ReleaseNotes and version to v2.18.6v2.18.6Saya Sugiura2021-01-061-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* CMakeList: implement cpack for debian packageKHANH LUONG HONG DUY2021-01-061-0/+6
| | | | | | Introduce cpack options to build DLT debian package Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* libdlt: support short versionBui Nguyen Quoc Thanh2021-01-061-1/+3
| | | | | | Use cmake option to support version with major number only. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Add support for logging with VSOCK (#255)Martin Ejdestig2020-12-141-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about VSOCK, see "man vsock" ( https://man7.org/linux/man-pages/man7/vsock.7.html ). Makes it possible for processes in a virtual machine to log directly in DLT running on host without setting up a network connection between guest and host. It is also probably more efficient. Have not done any performance measurements (not main reason for patch), but no forwarding is required as when running DLT in a multi-node setup. When building dlt-daemon for host, WITH_DLT_DAEMON_VSOCK_IPC should be enabled for daemon to listen on incoming VSOCK requests. Local communication method between applications and daemon is still determined with DLT_IPC. When building for guest, WITH_DLT_LIB_VSOCK_IPC should be enabled and DLT_IPC will be ignored, which will make libdlt open a VSOCK socket to the deamon for logging messages. VSOCK can be tested without a virtual machine. Since VMADDR_CID_HOST is used by libdlt when connecting, see vsock man page, clients can be run on host to test VSOCK communication. Some modifications has been done to be able to handle logging through FIFO pipe and socket in the same build of dlt-daemon: - dlt_receiver_init/free_unix_socket() is renamed to dlt_receiver_init/free_global_buffer() and used for FIFO as well. Also fixes memory leak since dlt_receiver_free_unix_socket() was used regardless of whether DLT_USE_UNIX_SOCKET was defined or not. - Pass type to dlt_receiver_init() instead of dlt_receiver_receive(). And remove preprocessor conditionals for handling DLT_CONNECTION_APP_MSG in dlt_daemon_process_user_messages(). Also fixes wrong enum type being passed to dlt_receiver_receive() in dlt_client.c (DltClient::mode was used as a DltReceiverType enum but it is a DltClientMode enum). - Add a flag to DltDaemonApplication to indicate whether file descriptor is "owned" by the DltDaemonApplication or not. When dlt_daemon_application_add() is called due to message received on a socket, fd is passed as an argument (app does not own fd). For FIFO, a per application FIFO is opened (app owns the fd). Also fixes so that user handle is reset for both application and all its contexts when resetting any. Prevents fd from being used by accident after it has been closed. dlt_mkdir_recursive() is moved to src/daemon since it is only used in the daemon. Minimizes use of DLT_USE_UNIX_SOCKET_IPC. Other bugfixes: - Call DLT_SEM_FREE() if setting socket to O_NONBLOCK fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). - Close socket if dlt_receiver_init() fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* Simplify setting of CONFIGURATION_FILES_DIR in CMakeLists.txt (#247)Martin Ejdestig2020-10-201-6/+1
| | | | | | | | | | | | | | | | | By using CMAKE_INSTALL_FULL_SYSCONFDIR from GNUInstallDirs. It also fixes building with CMAKE_INSTALL_PREFIX=/ that would otherwise warn with: CMake Error at src/daemon/cmake_install.cmake:70 (file): file called with network path DESTINATION. This does not make sense when using DESTDIR. Specify local absolute path or remove DESTDIR environment variable. DESTINATION= //etc Signed-off-by: Martin Ejdestig <mejdestig@luxoft.com>
* Modify CMAKE_C_COMPILER check for QNX to accept "qcc" (#246)Martin Ejdestig2020-09-071-1/+1
| | | | | | | | | | | | | | nto-qnx matches architecture "sub-binaries" for qcc, but can also invoke with qcc binary and specify architecture. The CMake documentation has an example for a QNX toolchain file that sets CMAKE_C_COMPILER to qcc, so it is probably very common. See: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx Not sure why this check is needed. (Is qcc really the only compiler that can be used to build for QNX?) An alternative could be to remove it completely. Signed-off-by: Martin Ejdestig <mejdestig@luxoft.com>
* Update ReleaseNotes and version to v2.18.5v2.18.5LUONG HONG DUY KHANH(RBVH/ENG42)2020-07-091-1/+1
| | | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* slog2 adapter on QNXNguyen Dinh Thi2020-07-081-0/+5
| | | | | | | | | | | | | | | dlt-qnx-system can be used to send syslog on QNX to dlt-daemon using slog2 API. It was be built with setting cmake option WITH_DLT_QNX_SYSTEM to ON. Add markdown manual page for dlt-qnx-system Signed-off-by: Nguyen Dinh Thi (RBVH/ENG2) <Thi.NguyenDinh@vn.bosch.com> Signed-off-by: Le Hoang Ngoc Quynh <Quynh.LeHoangNgoc@vn.bosch.com> Signed-off-by: Sebastian Unger <sunger@de.adit-jv.com> Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* set DLT_NETWORK_TRACE_ENABLE by cmakedefineFelix Herrmann2020-07-061-1/+2
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* update cmake VERSION variablesFelix Herrmann2020-07-061-1/+1
| | | | | | | align variable names with cmake 3.3 change. => DLT_VERSION* -> PROJECT_VERSION* Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* execute unittests with cmakeFelix Herrmann2020-07-061-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now you can do make test after make :) === Sample build and test: $ cmake -Bbuild -H. \ -DDLT_IPC=UNIX_SOCKET \ -DWITH_DLT_ADAPTOR=ON \ -DWITH_DLT_UNIT_TESTS=ON \ -DWITH_DLT_CXX11_EXT=ON \ -DWITH_DLT_MONITOR=OFF \ -DWITH_DLT_USE_IPv6=OFF $ cd build $ make $ make test Running tests... Test project /home/fherrmann/git/dlt-daemon/build Start 1: gtest_dlt_common 1/5 Test #1: gtest_dlt_common ................. Passed 0.02 sec Start 2: gtest_dlt_user 2/5 Test #2: gtest_dlt_user ................... Passed 1.01 sec Start 3: gtest_dlt_daemon_common 3/5 Test #3: gtest_dlt_daemon_common .......... Passed 0.01 sec Start 4: dlt_env_ll_unit_test 4/5 Test #4: dlt_env_ll_unit_test ............. Passed 0.04 sec Start 5: gtest_dlt_daemon_event_handler 5/5 Test #5: gtest_dlt_daemon_event_handler ... Passed 1.01 sec 100% tests passed, 0 tests failed out of 5 Total Test time (real) = 2.09 sec === Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* network trace: Add mqueue verificationSaya Sugiura2020-07-061-0/+8
| | | | | | | | | | 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>
* Improvement: Make ZLib dependency optional (#182)Sebastian Kloska2019-11-081-1/+3
| | | | | | | | * New CMake option WITH_DLT_FILETRANSFER * Only request ZLIB package if WITH_DLT_COREDUMPHANDLER==ON or WITH_DLT_FILETRANSFER==ON Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
* udp: Disable WITH_UDP_CONNECTION as defaultSaya Sugiura2019-09-131-1/+1
| | | | | | | | This commit sets WITH_UDP_CONNECTION to OFF as default. Related commit: ae663ab UDP Multicast implementation (#155) Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Update ReleaseNotes and version to v2.18.4v2.18.4Saya Sugiura2019-09-031-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* UDP Multicast implementation (#155)Sunil-K-S2019-08-231-0/+2
| | | | | The feature can be enabled by setting WITH_UDP_CONNECTION to ON. Signed-off-by: sunil.s <sunil.s@lge.com>
* doxygen: Remove licenceSaya Sugiura2019-07-191-2/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cmake-improvements (#135)Vo Trung Chi2019-07-031-174/+178
| | | | | | | | | | | | | | | 1. Allow building as a subproject of another cmake project (CMAKE_* vs PROJECT_* variables) 2. Do not generate header files within source – bad practice, use build directory for that(e.g. change location where dlt_version.h is being generated) 3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper compile environment definition, also bad practice, also see p.2 4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable option, should probably be part of headers install routine. Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
* Update ReleaseNotes and version to v2.18.3v2.18.3Saya Sugiura2019-06-111-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Update ReleaseNotes and version to v2.18.2v2.18.2Saya Sugiura2019-04-161-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Update ReleaseNotes and version to v2.18.0v2.18.0Christoph Lipka2018-12-211-1/+1
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* CMake: Set default configurationChristoph Lipka2018-12-211-5/+5
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Remove unnecessary reference to zlib in .pc fileNguyen Dinh Thi2018-12-211-0/+3
| | | | Signed-off-by: Nguyen Dinh Thi <Thi.NguyenDinh@vn.bosch.com>
* cmake: systemd: fix hardcoded user in dlt-dbus.service (Issue #36)Christoph Lipka2018-12-061-2/+1
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Log storage - Updates (#82)ManikandanChockalingam2018-11-151-1/+1
| | | | | | | | | | - improvements and refactor key creation - Sync strategies added Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* IPC: Unix socket added (#43)ManikandanChockalingam2018-05-181-1/+12
| | | | | | | | | * IPC: Unix socket added The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option. Socket path configurable for both FIFO and Unix Socket now configurable in CMake Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>