Skip to content

Normalize common_system integration flags to KCENON_HAS_*#278

Merged
kcenon merged 4 commits into
mainfrom
feature/normalize-common-system-flags
Dec 22, 2025
Merged

Normalize common_system integration flags to KCENON_HAS_*#278
kcenon merged 4 commits into
mainfrom
feature/normalize-common-system-flags

Conversation

@kcenon

@kcenon kcenon commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add unified feature_flags.h header for normalized KCENON_* macros
  • Replace BUILD_WITH_COMMON_SYSTEM checks with KCENON_HAS_COMMON_SYSTEM in all integration adapters
  • Update documentation to reference the new macro convention

Changes

New Files

  • include/kcenon/database/config/feature_flags.h - Unified feature flags header that:
    • Includes common_system's feature_flags.h when available
    • Defines KCENON_HAS_COMMON_SYSTEM based on legacy BUILD_WITH_COMMON_SYSTEM
    • Provides legacy aliases for backward compatibility

Modified Files

  • include/kcenon/database/adapters/common_system_database_adapter.h
  • include/kcenon/database/di/service_registration.h
  • database/integrated/adapters/backends/common_logger_backend.h
  • database/integrated/adapters/backends/common_logger_backend.cpp
  • database/integrated/core/common_result.h
  • README.md, docs/advanced/STRUCTURE.md, docs/advanced/TYPE_SYSTEM.md, docs/guides/FAQ.md, docs/advanced/ARCHITECTURE.md

Test plan

  • Build with BUILD_WITH_COMMON_SYSTEM=ON - verify KCENON_HAS_COMMON_SYSTEM is set
  • Build with BUILD_WITH_COMMON_SYSTEM=OFF - verify fallback behavior unchanged
  • Run existing integration tests
  • Verify backward compatibility with legacy macro usage

Related Issues

Add feature_flags.h header that normalizes integration detection:
- Define KCENON_HAS_COMMON_SYSTEM based on legacy BUILD_WITH_COMMON_SYSTEM
- Include common_system feature_flags.h when available
- Provide legacy aliases for backward compatibility

Part of kcenon/common_system#223
Closes #277 (partial)
…COMMON_SYSTEM

Update all integration adapters to use normalized KCENON_HAS_COMMON_SYSTEM
macro instead of legacy BUILD_WITH_COMMON_SYSTEM:
- common_system_database_adapter.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- service_registration.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- common_logger_backend.h/.cpp: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- common_result.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM

Part of kcenon/common_system#223
Closes #277 (partial)
Update code examples and references in documentation:
- README.md: note KCENON_HAS_COMMON_SYSTEM in BUILD_WITH_COMMON_SYSTEM description
- STRUCTURE.md: update code examples to use KCENON_HAS_COMMON_SYSTEM
- TYPE_SYSTEM.md: update conditional description
- FAQ.md: update integration example with feature_flags.h include
- ARCHITECTURE.md: update code example

Part of kcenon/common_system#223
Closes #277
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

No comparison reports available. Baseline may not be established yet.

Add ${CMAKE_SOURCE_DIR}/include to target_include_directories for both
static library and header-only cases. This allows integrated code to
include headers from include/kcenon/database/ using angle brackets.

Fixes build failure due to missing kcenon/database/config/feature_flags.h
@kcenon kcenon merged commit 3301443 into main Dec 22, 2025
26 checks passed
@kcenon kcenon deleted the feature/normalize-common-system-flags branch December 22, 2025 16:52
kcenon added a commit that referenced this pull request Apr 13, 2026
* feat(config): add unified feature_flags.h for KCENON_* macros

Add feature_flags.h header that normalizes integration detection:
- Define KCENON_HAS_COMMON_SYSTEM based on legacy BUILD_WITH_COMMON_SYSTEM
- Include common_system feature_flags.h when available
- Provide legacy aliases for backward compatibility

Part of kcenon/common_system#223
Closes #277 (partial)

* refactor(adapters): replace BUILD_WITH_COMMON_SYSTEM with KCENON_HAS_COMMON_SYSTEM

Update all integration adapters to use normalized KCENON_HAS_COMMON_SYSTEM
macro instead of legacy BUILD_WITH_COMMON_SYSTEM:
- common_system_database_adapter.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- service_registration.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- common_logger_backend.h/.cpp: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM
- common_result.h: include feature_flags.h, use KCENON_HAS_COMMON_SYSTEM

Part of kcenon/common_system#223
Closes #277 (partial)

* docs: update documentation to reference KCENON_HAS_COMMON_SYSTEM

Update code examples and references in documentation:
- README.md: note KCENON_HAS_COMMON_SYSTEM in BUILD_WITH_COMMON_SYSTEM description
- STRUCTURE.md: update code examples to use KCENON_HAS_COMMON_SYSTEM
- TYPE_SYSTEM.md: update conditional description
- FAQ.md: update integration example with feature_flags.h include
- ARCHITECTURE.md: update code example

Part of kcenon/common_system#223
Closes #277

* fix(build): add project include directory to integrated_database target

Add ${CMAKE_SOURCE_DIR}/include to target_include_directories for both
static library and header-only cases. This allows integrated code to
include headers from include/kcenon/database/ using angle brackets.

Fixes build failure due to missing kcenon/database/config/feature_flags.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize common_system integration flags

1 participant