From 4c0a4a267e66fb31f5ddfc44ba5e5f34b586b952 Mon Sep 17 00:00:00 2001 From: Saya Sugiura Date: Thu, 1 Apr 2021 09:16:58 +0000 Subject: tests: Enable macro disabling 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 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d6377f0..f4bf8df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ option(WITH_DLT_KPI "Set to ON to build src/kpi binaries" option(WITH_DLT_FATAL_LOG_TRAP "Set to ON to enable DLT_LOG_FATAL trap(trigger segv inside dlt-user library)" OFF) option(WITH_UDP_CONNECTION "Set to ON to enable dlt UDP multicast SUPPORT" OFF) option(WITH_LIB_SHORT_VERSION "Set to ON to build library with only major number in version" OFF) +option(WITH_DLT_DISABLE_MACRO "Set to ON to build code without Macro interface support" OFF) option(WITH_LEGACY_INCLUDE_PATH "Set to ON to add /dlt to include paths for the CMake config file, in addition to only " ON) option(WITH_EXTENDED_FILTERING "Set to OFF to build without extended filtering. Using json filter files is only supported for Linux based system with json-c and QNX." OFF) @@ -155,6 +156,10 @@ if(WITH_DLT_USE_IPv6) add_definitions(-DDLT_USE_IPv6) endif() +if(WITH_DLT_DISABLE_MACRO) + add_definitions(-DDLT_DISABLE_MACRO) +endif() + if(WITH_DLT_QNX_SYSTEM AND NOT "${CMAKE_C_COMPILER}" MATCHES "nto-qnx|qcc") message(FATAL_ERROR "Can only compile for QNX with a QNX compiler.") endif() @@ -319,6 +324,7 @@ message(STATUS "WITH_DLT_QNX_SYSTEM = ${WITH_DLT_QNX_SYSTEM}") message(STATUS "WITH_LIB_SHORT_VERSION = ${WITH_LIB_SHORT_VERSION}") message(STATUS "WITH_LEGACY_INCLUDE_PATH = ${WITH_LEGACY_INCLUDE_PATH}") message(STATUS "WITH_EXTENDED_FILTERING = ${WITH_EXTENDED_FILTERING}") +message(STATUS "WITH_DLT_DISABLE_MACRO = ${WITH_DLT_DISABLE_MACRO}") message(STATUS "Change a value with: cmake -D=") message(STATUS "-------------------------------------------------------------------------------") message(STATUS) -- cgit v1.2.1