From 0ba1b7c0a78c5c7deb26b98c3bf60eabcdd0d235 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 6 Feb 2024 21:16:00 -0500 Subject: [PATCH] Move messagedef to its own buildfile (#31972) Co-authored-by: Andrei Litvin --- src/app/BUILD.gn | 89 +------------------------- src/app/MessageDef/BUILD.gn | 123 ++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 88 deletions(-) create mode 100644 src/app/MessageDef/BUILD.gn diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 52f14d9f308f7f..84540e97892e6a 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -110,93 +110,6 @@ source_set("subscription-manager") { public_deps = [ "${chip_root}/src/lib/core" ] } -source_set("message-def") { - sources = [ - "MessageDef/ArrayBuilder.cpp", - "MessageDef/ArrayParser.cpp", - "MessageDef/AttributeDataIB.cpp", - "MessageDef/AttributeDataIB.h", - "MessageDef/AttributeDataIBs.cpp", - "MessageDef/AttributeDataIBs.h", - "MessageDef/AttributePathIB.cpp", - "MessageDef/AttributePathIB.h", - "MessageDef/AttributePathIBs.cpp", - "MessageDef/AttributePathIBs.h", - "MessageDef/AttributeReportIB.cpp", - "MessageDef/AttributeReportIB.h", - "MessageDef/AttributeReportIBs.cpp", - "MessageDef/AttributeReportIBs.h", - "MessageDef/AttributeStatusIB.cpp", - "MessageDef/AttributeStatusIB.h", - "MessageDef/AttributeStatusIBs.cpp", - "MessageDef/AttributeStatusIBs.h", - "MessageDef/Builder.cpp", - "MessageDef/Builder.h", - "MessageDef/ClusterPathIB.cpp", - "MessageDef/ClusterPathIB.h", - "MessageDef/CommandDataIB.cpp", - "MessageDef/CommandPathIB.cpp", - "MessageDef/CommandStatusIB.cpp", - "MessageDef/DataVersionFilterIB.cpp", - "MessageDef/DataVersionFilterIB.h", - "MessageDef/DataVersionFilterIBs.cpp", - "MessageDef/DataVersionFilterIBs.h", - "MessageDef/EventDataIB.cpp", - "MessageDef/EventDataIB.h", - "MessageDef/EventFilterIB.cpp", - "MessageDef/EventFilterIBs.cpp", - "MessageDef/EventPathIB.cpp", - "MessageDef/EventPathIB.h", - "MessageDef/EventPathIBs.cpp", - "MessageDef/EventPathIBs.h", - "MessageDef/EventReportIB.cpp", - "MessageDef/EventReportIB.h", - "MessageDef/EventReportIBs.cpp", - "MessageDef/EventReportIBs.h", - "MessageDef/EventStatusIB.cpp", - "MessageDef/EventStatusIB.h", - "MessageDef/InvokeRequestMessage.cpp", - "MessageDef/InvokeRequests.cpp", - "MessageDef/InvokeResponseIB.cpp", - "MessageDef/InvokeResponseIBs.cpp", - "MessageDef/InvokeResponseMessage.cpp", - "MessageDef/ListBuilder.cpp", - "MessageDef/ListParser.cpp", - "MessageDef/MessageBuilder.cpp", - "MessageDef/MessageBuilder.h", - "MessageDef/MessageDefHelper.cpp", - "MessageDef/MessageDefHelper.h", - "MessageDef/MessageParser.cpp", - "MessageDef/MessageParser.h", - "MessageDef/Parser.cpp", - "MessageDef/Parser.h", - "MessageDef/ReadRequestMessage.cpp", - "MessageDef/ReadRequestMessage.h", - "MessageDef/ReportDataMessage.cpp", - "MessageDef/ReportDataMessage.h", - "MessageDef/StatusIB.cpp", - "MessageDef/StatusIB.h", - "MessageDef/StatusResponseMessage.cpp", - "MessageDef/StructBuilder.cpp", - "MessageDef/StructParser.cpp", - "MessageDef/SubscribeRequestMessage.cpp", - "MessageDef/SubscribeResponseMessage.cpp", - "MessageDef/TimedRequestMessage.cpp", - "MessageDef/WriteRequestMessage.cpp", - "MessageDef/WriteResponseMessage.cpp", - ] - - deps = [ - ":app_config", - ":paths", - ":revision_info", - "${chip_root}/src/lib/core", - "${chip_root}/src/lib/support", - "${chip_root}/src/protocols/interaction_model", - "${chip_root}/src/protocols/secure_channel", - ] -} - config("config-controller-dynamic-server") { defines = [ "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", @@ -241,9 +154,9 @@ static_library("interaction-model") { public_deps = [ ":app_config", - ":message-def", ":paths", ":subscription-manager", + "${chip_root}/src/app/MessageDef", "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/app/icd/server:observer", "${chip_root}/src/lib/address_resolve", diff --git a/src/app/MessageDef/BUILD.gn b/src/app/MessageDef/BUILD.gn new file mode 100644 index 00000000000000..4880a9a8b126e4 --- /dev/null +++ b/src/app/MessageDef/BUILD.gn @@ -0,0 +1,123 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") + +source_set("MessageDef") { + sources = [ + "ArrayBuilder.cpp", + "ArrayBuilder.h", + "ArrayParser.cpp", + "ArrayParser.h", + "AttributeDataIB.cpp", + "AttributeDataIB.h", + "AttributeDataIBs.cpp", + "AttributeDataIBs.h", + "AttributePathIB.cpp", + "AttributePathIB.h", + "AttributePathIBs.cpp", + "AttributePathIBs.h", + "AttributeReportIB.cpp", + "AttributeReportIB.h", + "AttributeReportIBs.cpp", + "AttributeReportIBs.h", + "AttributeStatusIB.cpp", + "AttributeStatusIB.h", + "AttributeStatusIBs.cpp", + "AttributeStatusIBs.h", + "Builder.cpp", + "Builder.h", + "ClusterPathIB.cpp", + "ClusterPathIB.h", + "CommandDataIB.cpp", + "CommandDataIB.h", + "CommandPathIB.cpp", + "CommandPathIB.h", + "CommandStatusIB.cpp", + "CommandStatusIB.h", + "DataVersionFilterIB.cpp", + "DataVersionFilterIB.h", + "DataVersionFilterIBs.cpp", + "DataVersionFilterIBs.h", + "EventDataIB.cpp", + "EventDataIB.h", + "EventFilterIB.cpp", + "EventFilterIB.h", + "EventFilterIBs.cpp", + "EventFilterIBs.h", + "EventPathIB.cpp", + "EventPathIB.h", + "EventPathIBs.cpp", + "EventPathIBs.h", + "EventReportIB.cpp", + "EventReportIB.h", + "EventReportIBs.cpp", + "EventReportIBs.h", + "EventStatusIB.cpp", + "EventStatusIB.h", + "InvokeRequestMessage.cpp", + "InvokeRequestMessage.h", + "InvokeRequests.cpp", + "InvokeRequests.h", + "InvokeResponseIB.cpp", + "InvokeResponseIB.h", + "InvokeResponseIBs.cpp", + "InvokeResponseIBs.h", + "InvokeResponseMessage.cpp", + "InvokeResponseMessage.h", + "ListBuilder.cpp", + "ListBuilder.h", + "ListParser.cpp", + "ListParser.h", + "MessageBuilder.cpp", + "MessageBuilder.h", + "MessageDefHelper.cpp", + "MessageDefHelper.h", + "MessageParser.cpp", + "MessageParser.h", + "Parser.cpp", + "Parser.h", + "ReadRequestMessage.cpp", + "ReadRequestMessage.h", + "ReportDataMessage.cpp", + "ReportDataMessage.h", + "StatusIB.cpp", + "StatusIB.h", + "StatusResponseMessage.cpp", + "StatusResponseMessage.h", + "StructBuilder.cpp", + "StructBuilder.h", + "StructParser.cpp", + "StructParser.h", + "SubscribeRequestMessage.cpp", + "SubscribeRequestMessage.h", + "SubscribeResponseMessage.cpp", + "SubscribeResponseMessage.h", + "TimedRequestMessage.cpp", + "TimedRequestMessage.h", + "WriteRequestMessage.cpp", + "WriteRequestMessage.h", + "WriteResponseMessage.cpp", + "WriteResponseMessage.h", + ] + + deps = [ + "${chip_root}/src/app:app_config", + "${chip_root}/src/app:paths", + "${chip_root}/src/app:revision_info", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + "${chip_root}/src/protocols/interaction_model", + "${chip_root}/src/protocols/secure_channel", + ] +}