From 61ca2197e1cb64e8a3df4729bd2ff3ba93cb8014 Mon Sep 17 00:00:00 2001 From: ismail Date: Thu, 4 Sep 2025 18:23:05 +0300 Subject: [PATCH] Fix conditional compilation issues. Fixed include directory settings and conditional includes in CMakeLists and test_common.c. Refs #1085. --- test_apps/main/CMakeLists.txt | 4 ++-- test_apps/main/test_common.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test_apps/main/CMakeLists.txt b/test_apps/main/CMakeLists.txt index 3b8ff4d..fc44d68 100644 --- a/test_apps/main/CMakeLists.txt +++ b/test_apps/main/CMakeLists.txt @@ -3,7 +3,8 @@ set(srcs "test_common.c" "test_relay_chn_notify_common.c" "test_app_main.c") -set(incdirs ".") +set(incdirs "." + "../../private_include") # === Selective compilation based on channel count === if(CONFIG_RELAY_CHN_COUNT GREATER 1) @@ -23,7 +24,6 @@ if(CONFIG_RELAY_CHN_ENABLE_TILTING) endif() if(CONFIG_RELAY_CHN_ENABLE_NVS) - list(APPEND incdirs "../../private_include") list(APPEND srcs "../../src/relay_chn_nvs.c") if(CONFIG_RELAY_CHN_COUNT GREATER 1) list(APPEND srcs "test_relay_chn_nvs_multi.c") diff --git a/test_apps/main/test_common.c b/test_apps/main/test_common.c index b15b6c9..3c6786a 100644 --- a/test_apps/main/test_common.c +++ b/test_apps/main/test_common.c @@ -6,7 +6,10 @@ #include "test_common.h" #include "relay_chn_ctl.h" // For resetting the channels + +#if CONFIG_RELAY_CHN_ENABLE_TILTING #include "relay_chn_tilt.h" // For resetting tilt count +#endif const char *TEST_TAG = "RELAY_CHN_TEST";