# Copyright (c) 2021 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/build.gni")
import("//build_overrides/chip.gni")
import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/src/lib/lib.gni")

declare_args() {
  # TODO: cpp_standard check is not ideal, it should be >= 17,
  #       however for now this is what we use in compilations
  matter_commandline_enable_perfetto_tracing =
      current_os == "linux" && cpp_standard == "gnu++17"
}

config("default_config") {
  include_dirs = [ "." ]
}

buildconfig_header("tracing_features") {
  header = "enabled_features.h"
  header_dir = "tracing"

  defines = [
    "ENABLE_PERFETTO_TRACING=${matter_commandline_enable_perfetto_tracing}",
  ]
}

source_set("commandline") {
  sources = [
    "TracingCommandLineArgument.cpp",
    "TracingCommandLineArgument.h",
  ]

  deps = [
    "${chip_root}/src/lib/support",
    "${chip_root}/src/tracing",
    "${chip_root}/src/tracing/json",
  ]

  public_deps = [ ":tracing_features" ]

  public_configs = [ ":default_config" ]

  if (matter_commandline_enable_perfetto_tracing) {
    public_deps += [
      "${chip_root}/src/tracing/perfetto",
      "${chip_root}/src/tracing/perfetto:file_output",
    ]

    deps += [
      "${chip_root}/src/tracing/perfetto:event_storage",
      "${chip_root}/src/tracing/perfetto:simple_initialization",
    ]
  }

  cflags = [ "-Wconversion" ]
}

source_set("trace_handlers") {
  sources = [ "TraceHandlers.cpp" ]

  deps = [ "${chip_root}/src/lib" ]

  public_configs = [ ":default_config" ]

  cflags = [ "-Wconversion" ]
}

source_set("trace_handlers_decoder") {
  sources = [
    "TraceDecoder.cpp",
    "TraceHandlers.cpp",
    "decoder/TraceDecoderProtocols.cpp",
    "decoder/bdx/Decoder.cpp",
    "decoder/echo/Decoder.cpp",
    "decoder/interaction_model/Decoder.cpp",
    "decoder/interaction_model/DecoderCustomLog.cpp",
    "decoder/logging/Log.cpp",
    "decoder/logging/ToCertificateString.cpp",
    "decoder/secure_channel/Decoder.cpp",
    "decoder/udc/Decoder.cpp",
  ]

  public_configs = [ ":default_config" ]

  deps = [ "${chip_root}/src/lib" ]
  public_deps = [ "${chip_root}/third_party/jsoncpp" ]

  cflags = [ "-Wconversion" ]
}

executable("chip-trace-decoder") {
  sources = [
    "TraceDecoder.cpp",
    "TraceDecoderArgumentParser.cpp",
    "decoder/TraceDecoderProtocols.cpp",
    "decoder/bdx/Decoder.cpp",
    "decoder/echo/Decoder.cpp",
    "decoder/interaction_model/Decoder.cpp",
    "decoder/interaction_model/DecoderCustomLog.cpp",
    "decoder/logging/Log.cpp",
    "decoder/logging/ToCertificateString.cpp",
    "decoder/secure_channel/Decoder.cpp",
    "decoder/udc/Decoder.cpp",
    "main.cpp",
  ]

  output_dir = root_out_dir

  deps = [ "${chip_root}/src/platform/logging:force_stdio" ]

  public_deps = [
    "${chip_root}/src/lib",
    "${chip_root}/third_party/jsoncpp",
  ]

  cflags = [ "-Wconversion" ]
}
