﻿# Whether OPTIONAL_TRACE_EVENT macros are included in the build or not.
# Disabled by default on Android and ChromeOS due to binary size impact,
# enabled everywhere else.
set(OPTIONAL_TRACE_EVENTS_ENABLED NOT TARGET_ANDROID OR EXTENDED_TRACING_ENABLED)
#
set(BUILDFLAG_INTERNAL_ENABLE_BASE_TRACING "0")
if(ENABLE_BASE_TRACING)
  set(BUILDFLAG_INTERNAL_ENABLE_BASE_TRACING "1")
endif()
#
set(BUILDFLAG_INTERNAL_USE_PERFETTO_CLIENT_LIBRARY "0")
if(USE_PERFETTO_CLIENT_LIBRARY)
  set(BUILDFLAG_INTERNAL_USE_PERFETTO_CLIENT_LIBRARY "1")
endif(USE_PERFETTO_CLIENT_LIBRARY)
#
set(BUILDFLAG_INTERNAL_OPTIONAL_TRACE_EVENTS_ENABLED "0")
if(OPTIONAL_TRACE_EVENTS_ENABLED)
  set(BUILDFLAG_INTERNAL_OPTIONAL_TRACE_EVENTS_ENABLED "1")
endif()

configure_file_if_changed(
  INPUT ${BUILDFLAGS_GENERATORS_PATH}/buildflags/tracing_buildflags.h.inc
  OUTPUT ${BASE_SOURCES_PATH}/tracing_buildflags.h
  TMP_FILE ${CMAKE_CURRENT_BINARY_DIR}/tracing_buildflags.tmp)
