Skip to content

Commit

Permalink
Define dependencies for some files in zzz_generated and compatenums.h (
Browse files Browse the repository at this point in the history
…#32327)

* Add dependency on CompatEnumNames as this is a requirement and direct include of cluster-enums.h

* define ids as a source set for zzz generated

* Fix dependencies

* CompatEnumNames is NOT in a subdirectory of app, which is wrong however for now roll with it

* Move CompatEnumNames to common so linter catches it

* Restyle
  • Loading branch information
andy31415 authored Feb 27, 2024
1 parent d12311a commit 28c78af
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ jobs:
--known-failure app/CommandHandler.h \
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandSenderLegacyCallback.h \
--known-failure app/CompatEnumNames.h \
--known-failure app/data-model/ListLargeSystemExtensions.h \
--known-failure app/EventHeader.h \
--known-failure app/EventLoggingTypes.h \
Expand Down
15 changes: 15 additions & 0 deletions src/app/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ config("includes") {
include_dirs = [ "${chip_root}/zzz_generated/app-common" ]
}

source_set("ids") {
sources = [
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/ids/Events.h",
]

public_deps = [ "${chip_root}/src/app/util:types" ]

public_configs = [ ":includes" ]
}

static_library("cluster-objects") {
output_name = "libClusterObjects"

Expand All @@ -27,6 +40,7 @@ static_library("cluster-objects") {
]

public_deps = [
":ids",
"${chip_root}/src/app:paths",
"${chip_root}/src/app/data-model",
"${chip_root}/src/app/util:types",
Expand All @@ -42,6 +56,7 @@ source_set("enums") {
sources = [
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h",
"CompatEnumNames.h",
]

public_configs = [ ":includes" ]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/app/zap-templates/templates/app/cluster-enums.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ k{{asUpperCamelCase label}} = {{asHex mask}},
} // namespace chip

// Included at the end, so all our definitions above are available.
#include <app/CompatEnumNames.h>
#include <app/common/CompatEnumNames.h>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28c78af

Please sign in to comment.