Skip to content

Commit 1016080

Browse files
sharadb-amazonpull[bot]
authored andcommitted
Added build flag to allow/skip building Example Credential files (#25953)
1 parent 559efd9 commit 1016080

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/credentials/BUILD.gn

+17-8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import("//build_overrides/nlassert.gni")
1717
import("${chip_root}/src/crypto/crypto.gni")
1818
import("${chip_root}/src/platform/device.gni")
1919

20+
declare_args() {
21+
chip_build_example_creds = true
22+
}
23+
2024
static_library("credentials") {
2125
output_name = "libCredentials"
2226

@@ -47,16 +51,21 @@ static_library("credentials") {
4751
"attestation_verifier/DeviceAttestationDelegate.h",
4852
"attestation_verifier/DeviceAttestationVerifier.cpp",
4953
"attestation_verifier/DeviceAttestationVerifier.h",
50-
"examples/DeviceAttestationCredsExample.cpp",
51-
"examples/DeviceAttestationCredsExample.h",
52-
"examples/ExampleDACs.cpp",
53-
"examples/ExampleDACs.h",
54-
"examples/ExamplePAI.cpp",
55-
"examples/ExamplePAI.h",
56-
"examples/LastKnownGoodTimeCertificateValidityPolicyExample.h",
57-
"examples/StrictCertificateValidityPolicyExample.h",
5854
]
5955

56+
if (chip_build_example_creds) {
57+
sources += [
58+
"examples/DeviceAttestationCredsExample.cpp",
59+
"examples/DeviceAttestationCredsExample.h",
60+
"examples/ExampleDACs.cpp",
61+
"examples/ExampleDACs.h",
62+
"examples/ExamplePAI.cpp",
63+
"examples/ExamplePAI.h",
64+
"examples/LastKnownGoodTimeCertificateValidityPolicyExample.h",
65+
"examples/StrictCertificateValidityPolicyExample.h",
66+
]
67+
}
68+
6069
# TODO: These tests files should be removed after the DeviceAttestationCredsExample implementation
6170
# is changed to generate it's own credentials instead of using Test credentials.
6271
# For some platforms test builds, which are bilding monolithic test library these files are not needed.

0 commit comments

Comments
 (0)