Skip to content

Commit 68ed8b2

Browse files
committed
Fix ICD source sets
Don't create ICD Check-In related source sets if `chip_enable_icd_checkin` is disabled. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent e0320f9 commit 68ed8b2

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

src/app/icd/server/BUILD.gn

+28-21
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,22 @@ source_set("notifier") {
7070
]
7171
}
7272

73-
source_set("check-in-back-off") {
74-
sources = [ "ICDCheckInBackOffStrategy.h" ]
73+
if (chip_enable_icd_checkin || chip_build_tests) {
74+
source_set("check-in-back-off") {
75+
sources = [ "ICDCheckInBackOffStrategy.h" ]
7576

76-
public_deps = [
77-
":monitoring-table",
78-
"${chip_root}/src/lib/core",
79-
"${chip_root}/src/lib/support",
80-
]
81-
}
77+
public_deps = [
78+
":monitoring-table",
79+
"${chip_root}/src/lib/core",
80+
"${chip_root}/src/lib/support",
81+
]
82+
}
8283

83-
source_set("default-check-in-back-off") {
84-
sources = [ "DefaultICDCheckInBackOffStrategy.h" ]
84+
source_set("default-check-in-back-off") {
85+
sources = [ "DefaultICDCheckInBackOffStrategy.h" ]
8586

86-
public_deps = [ ":check-in-back-off" ]
87+
public_deps = [ ":check-in-back-off" ]
88+
}
8789
}
8890

8991
# ICD Manager source-set is broken out of the main source-set to enable unit tests
@@ -126,26 +128,31 @@ source_set("sender") {
126128

127129
public_deps = [
128130
":configuration-data",
129-
":monitoring-table",
130131
":notifier",
131132
"${chip_root}/src/credentials:credentials",
132133
"${chip_root}/src/lib/address_resolve:address_resolve",
133134
"${chip_root}/src/protocols/secure_channel",
134135
]
136+
137+
if (chip_enable_icd_checkin) {
138+
public_deps += [ ":monitoring-table" ]
139+
}
135140
}
136141

137142
# ICDMonitoringTable source-set is broken out of the main source-set to enable unit tests
138143
# All sources and configurations used by the ICDMonitoringTable need to go in this source-set
139-
source_set("monitoring-table") {
140-
sources = [
141-
"ICDMonitoringTable.cpp",
142-
"ICDMonitoringTable.h",
143-
]
144+
if (chip_enable_icd_checkin || chip_build_tests) {
145+
source_set("monitoring-table") {
146+
sources = [
147+
"ICDMonitoringTable.cpp",
148+
"ICDMonitoringTable.h",
149+
]
144150

145-
public_deps = [
146-
"${chip_root}/src/lib/core",
147-
"${chip_root}/src/platform:platform",
148-
]
151+
public_deps = [
152+
"${chip_root}/src/lib/core",
153+
"${chip_root}/src/platform:platform",
154+
]
155+
}
149156
}
150157

151158
source_set("configuration-data") {

0 commit comments

Comments
 (0)