From 1ef24796f91be77930b6fe6ad05a7aa0a3f1f9c0 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Tue, 4 Feb 2025 12:03:01 +0100 Subject: [PATCH] Add compile definitions E1AP_LOG_ERRORS * this is necessary to enable the error logs in the E1 libs * also, updated the define name in the E1AP lib --- openair2/E1AP/CMakeLists.txt | 4 ++++ openair2/E1AP/lib/e1ap_lib_common.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/E1AP/CMakeLists.txt b/openair2/E1AP/CMakeLists.txt index 5849a32fe5..eb3bd0f546 100644 --- a/openair2/E1AP/CMakeLists.txt +++ b/openair2/E1AP/CMakeLists.txt @@ -10,3 +10,7 @@ target_include_directories(e1ap PUBLIC ${CMAKE_CURRENT_DIR}) if(ENABLE_TESTS) add_subdirectory(tests) endif() + +if(ENABLE_TESTS) + target_compile_definitions(e1ap PRIVATE E1AP_LOG_ERRORS) +endif() diff --git a/openair2/E1AP/lib/e1ap_lib_common.h b/openair2/E1AP/lib/e1ap_lib_common.h index 39e3d64448..6fda2cd8ca 100644 --- a/openair2/E1AP/lib/e1ap_lib_common.h +++ b/openair2/E1AP/lib/e1ap_lib_common.h @@ -28,7 +28,7 @@ #include "openair3/UTILS/conversions.h" #include "e1ap_messages_types.h" -#ifdef ENABLE_TESTS +#ifdef E1AP_LOG_ERRORS #define PRINT_ERROR(...) fprintf(stderr, ##__VA_ARGS__); #else #define PRINT_ERROR(...) // Do nothing