Skip to content

Commit 8bb7645

Browse files
adigienordicjm
authored andcommitted
[nrf fromtree] Remove ICD server sources from chip_data_model.cmake (project-chip#37513)
* Remove ICD server sources from chip_data_model.cmake ICD server sources are built by gn, there is no need to compile them twice. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no> * Fix ICD dependencies Don't depend on ICD if it's not enabled. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no> * Fix gn include warnings Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no> * iOS TVCasting app: Add missing chip_project_config_include `chip_project_config_include` has to be set to get correct include order of configuration files in `CHIPDeviceConfig.h` and prevent macro redefined warnings coming from overriding defines already defined by `CHIPConfig.h`. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no> --------- Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no> (cherry picked from commit abd2e1d)
1 parent a85d6b0 commit 8bb7645

File tree

11 files changed

+24
-30
lines changed

11 files changed

+24
-30
lines changed

examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#include <ti/drivers/apps/LED.h>
6262

6363
#if CHIP_CONFIG_ENABLE_ICD_UAT
64-
#include "app/icd/server/ICDNotifier.h"
64+
#include "app/icd/server/ICDNotifier.h" // nogncheck
6565
#endif
6666

6767
/* syscfg */

examples/lighting-app/cc13x4_26x4/src/AppTask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#include <ti/drivers/apps/LED.h>
5757

5858
#if CHIP_CONFIG_ENABLE_ICD_UAT
59-
#include "app/icd/server/ICDNotifier.h"
59+
#include "app/icd/server/ICDNotifier.h" // nogncheck
6060
#endif
6161

6262
/* syscfg */

examples/lock-app/cc13x4_26x4/src/AppTask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#include <ti/drivers/apps/LED.h>
5656

5757
#if CHIP_CONFIG_ENABLE_ICD_UAT
58-
#include "app/icd/server/ICDNotifier.h"
58+
#include "app/icd/server/ICDNotifier.h" // nogncheck
5959
#endif
6060

6161
/* syscfg */

examples/pump-app/cc13x4_26x4/main/AppTask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include <ti/drivers/apps/LED.h>
5858

5959
#if CHIP_CONFIG_ENABLE_ICD_UAT
60-
#include "app/icd/server/ICDNotifier.h"
60+
#include "app/icd/server/ICDNotifier.h" // nogncheck
6161
#endif
6262

6363
/* syscfg */

examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#include <ti/drivers/apps/LED.h>
5353

5454
#if CHIP_CONFIG_ENABLE_ICD_UAT
55-
#include "app/icd/server/ICDNotifier.h"
55+
#include "app/icd/server/ICDNotifier.h" // nogncheck
5656
#endif
5757

5858
/* syscfg */

src/app/BUILD.gn

+5-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ static_library("interaction-model") {
235235
"${chip_root}/src/app/codegen-data-model-provider:instance-header",
236236
"${chip_root}/src/app/data-model-provider",
237237
"${chip_root}/src/app/icd/server:icd-server-config",
238-
"${chip_root}/src/app/icd/server:manager",
239238
"${chip_root}/src/app/icd/server:observer",
240239
"${chip_root}/src/app/util:af-types",
241240
"${chip_root}/src/app/util:callbacks",
@@ -247,6 +246,10 @@ static_library("interaction-model") {
247246
"${chip_root}/src/system",
248247
]
249248

249+
if (chip_enable_icd_server) {
250+
public_deps += [ "${chip_root}/src/app/icd/server:manager" ]
251+
}
252+
250253
public_configs = [ "${chip_root}/src:includes" ]
251254

252255
if (chip_use_data_model_interface == "disabled") {
@@ -467,6 +470,7 @@ static_library("app") {
467470
":constants",
468471
":global-attributes",
469472
":interaction-model",
473+
":test-event-trigger",
470474
"${chip_root}/src/app/data-model",
471475
"${chip_root}/src/app/icd/server:icd-server-config",
472476
"${chip_root}/src/app/util:callbacks",

src/app/chip_data_model.cmake

-13
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ function(chip_configure_data_model APP_TARGET)
141141
)
142142
endif()
143143

144-
# These are:
145-
# //src/app/icd/server:notfier
146-
# //src/app/icd/server:monitoring-table
147-
# //src/app/icd/server:configuration-data
148-
#
149-
# TODO: ideally we would avoid duplication and would link gn-built items. In this case
150-
# it may be slightly harder because these are source_sets rather than libraries.
151-
target_sources(${APP_TARGET} ${SCOPE}
152-
${CHIP_APP_BASE_DIR}/icd/server/ICDMonitoringTable.cpp
153-
${CHIP_APP_BASE_DIR}/icd/server/ICDNotifier.cpp
154-
${CHIP_APP_BASE_DIR}/icd/server/ICDConfigurationData.cpp
155-
)
156-
157144
# This is:
158145
# //src/app/common:cluster-objects
159146
#

src/app/chip_data_model.gni

+7-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import("//build_overrides/chip.gni")
1717
import("${chip_root}/build/chip/chip_codegen.gni")
1818
import("${chip_root}/src/app/codegen-data-model-provider/model.gni")
1919
import("${chip_root}/src/app/common_flags.gni")
20+
import("${chip_root}/src/app/icd/icd.gni")
2021
import("${chip_root}/src/platform/python.gni")
2122

2223
_app_root = get_path_info(".", "abspath")
@@ -331,9 +332,13 @@ template("chip_data_model") {
331332
deps += [
332333
"${chip_root}/src/app/icd/server:configuration-data",
333334
"${chip_root}/src/app/icd/server:icd-server-config",
334-
"${chip_root}/src/app/icd/server:monitoring-table",
335-
"${chip_root}/src/app/icd/server:notifier",
336335
]
336+
if (chip_enable_icd_server) {
337+
deps += [ "${chip_root}/src/app/icd/server:notifier" ]
338+
if (chip_enable_icd_checkin) {
339+
deps += [ "${chip_root}/src/app/icd/server:monitoring-table" ]
340+
}
341+
}
337342
} else if (cluster == "resource-monitoring-server") {
338343
sources += [
339344
"${_app_root}/clusters/${cluster}/${cluster}.cpp",

src/app/clusters/icd-management-server/icd-management-server.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
#include <app-common/zap-generated/ids/Clusters.h>
2525
#include <app/AttributeAccessInterface.h>
2626
#include <app/AttributeAccessInterfaceRegistry.h>
27-
#include <app/icd/server/ICDNotifier.h>
27+
#if CHIP_CONFIG_ENABLE_ICD_CIP
28+
#include <app/icd/server/ICDNotifier.h> // nogncheck
29+
#endif
2830
#include <app/server/Server.h>
2931
#include <app/util/attribute-storage.h>
3032

src/app/clusters/icd-management-server/icd-management-server.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#if CHIP_CONFIG_ENABLE_ICD_CIP
3232
#include <app/ConcreteAttributePath.h>
33-
#include <app/icd/server/ICDMonitoringTable.h>
33+
#include <app/icd/server/ICDMonitoringTable.h> // nogncheck
3434
#include <lib/core/CHIPPersistentStorageDelegate.h>
3535
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
3636

src/app/server/BUILD.gn

+3-7
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,8 @@ static_library("server") {
6868
# be updated if this is not really "testing" even though headers are Test*.h)
6969
public_deps += [ "${chip_root}/src/lib/support:testing" ]
7070

71-
if (chip_enable_icd_server) {
72-
public_deps += [ "${chip_root}/src/app/icd/server:notifier" ]
73-
74-
if (chip_enable_icd_checkin) {
75-
public_deps +=
76-
[ "${chip_root}/src/app/icd/server:default-check-in-back-off" ]
77-
}
71+
if (chip_enable_icd_checkin) {
72+
public_deps +=
73+
[ "${chip_root}/src/app/icd/server:default-check-in-back-off" ]
7874
}
7975
}

0 commit comments

Comments
 (0)