Skip to content

chore(cmake): Polish config template for ecosystem consistency #617

Description

@kcenon

What

Update monitoring_system-config.cmake.in to match ecosystem conventions established by database_system, network_system, and container_system config templates.

Current State

The config template has complete find_dependency() coverage but lacks several consistency features present in sibling libraries.

Gaps vs. Ecosystem Standard

Feature database_system network_system monitoring_system
Header comment with target docs
_FOUND variable
_INCLUDE_DIRS variable
_LIBRARIES variable
Legacy namespace aliases
message(STATUS "Found ...")
Temp variable cleanup (unset()) N/A

Why

  • Consumers using _FOUND/_LIBRARIES pattern (common in legacy CMake) cannot discover monitoring_system
  • Temporary variables (MONITORING_USE_THREAD_SYSTEM, etc.) leak into consumer CMake scope
  • Missing status message makes build log debugging harder
  • Ecosystem should present a uniform find_package experience across all 8 libraries

Where

  • cmake/monitoring_system-config.cmake.in

How

Technical Approach

  1. Add header comment documenting exported targets (monitoring_system::monitoring, etc.)
  2. Add compatibility variables: monitoring_system_FOUND, monitoring_system_INCLUDE_DIRS, monitoring_system_LIBRARIES
  3. Add legacy namespace aliases: MonitoringSystem::monitoringmonitoring_system::monitoring
  4. Add message(STATUS "Found monitoring_system ${monitoring_system_VERSION}")
  5. Add unset() for temporary variables (MONITORING_USE_THREAD_SYSTEM, MONITORING_USE_LOGGER_SYSTEM, MONITORING_USE_NETWORK_SYSTEM, MONITORING_USE_GRPC)

Acceptance Criteria

  • Config template includes header comment with target documentation
  • monitoring_system_FOUND, _INCLUDE_DIRS, _LIBRARIES set correctly
  • Legacy MonitoringSystem:: aliases created
  • Status message printed on successful find
  • Temporary variables cleaned up with unset()
  • find_package(monitoring_system CONFIG) still works correctly

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/mediumMedium priority - Important but not urgentsize/SSmall - Less than 1 day of worktype/choreMaintenance and cleanup tasks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions