Skip to content

Replace PACS_WITH_COMMON_SYSTEM with KCENON_HAS_COMMON_SYSTEM#402

Merged
kcenon merged 2 commits into
mainfrom
feature/replace-pacs-common-system-macro
Dec 23, 2025
Merged

Replace PACS_WITH_COMMON_SYSTEM with KCENON_HAS_COMMON_SYSTEM#402
kcenon merged 2 commits into
mainfrom
feature/replace-pacs-common-system-macro

Conversation

@kcenon

@kcenon kcenon commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Summary

  • Replace project-specific macro PACS_WITH_COMMON_SYSTEM with unified KCENON_HAS_COMMON_SYSTEM macro
  • Update header files to use #if KCENON_HAS_COMMON_SYSTEM pattern with default value 0
  • Update CMake to define both macros for backward compatibility during migration window
  • Keep PACS_WITH_COMMON_SYSTEM as legacy alias
  • [Additional Fix] Add KCENON_HAS_COMMON_EXECUTOR=1 for thread_system ABI compatibility

Changes

Header Files

  • include/pacs/ai/ai_service_connector.hpp
  • include/pacs/integration/dicom_session.hpp
  • include/pacs/integration/network_adapter.hpp

Source Files

  • src/ai/ai_result_handler.cpp
  • src/network/dicom_server.cpp
  • src/network/v2/dicom_association_handler.cpp
  • src/network/v2/dicom_server_v2.cpp

Build Configuration

  • CMakeLists.txt:
    • Define KCENON_HAS_COMMON_SYSTEM=1 and PACS_WITH_COMMON_SYSTEM=1 when common_system is available
    • Define KCENON_HAS_COMMON_EXECUTOR=1 for thread_system ABI compatibility (fixes Windows link error)

Tests

  • tests/services/storage_scu_test.cpp

Related PRs

Test plan

  • Verify CMake configuration succeeds with common_system enabled
  • Verify build succeeds on macOS
  • Verify build succeeds on Ubuntu (gcc/clang)
  • Verify build succeeds on Windows (MSVC)
  • Verify existing functionality unchanged

Closes #401

…MON_SYSTEM

Replace the project-specific macro PACS_WITH_COMMON_SYSTEM with the unified
KCENON_HAS_COMMON_SYSTEM macro for consistent feature flag naming across
the kcenon ecosystem.

Changes:
- Update header files (dicom_session.hpp, network_adapter.hpp,
  ai_service_connector.hpp) to use KCENON_HAS_COMMON_SYSTEM with default
  value 0 when not defined
- Update source files to use #if KCENON_HAS_COMMON_SYSTEM instead of
  #ifdef PACS_WITH_COMMON_SYSTEM
- Update CMakeLists.txt to define both KCENON_HAS_COMMON_SYSTEM=1 and
  PACS_WITH_COMMON_SYSTEM=1 for backward compatibility
- Add macro default definitions in source files that use the macro

The legacy PACS_WITH_COMMON_SYSTEM is kept as an alias during the
migration window.

Closes #401
…atibility

thread_system's thread_pool.h uses conditional compilation for is_running():
- KCENON_HAS_COMMON_EXECUTOR=1: virtual function with 'override'
- KCENON_HAS_COMMON_EXECUTOR=0: non-virtual function

When thread_system is compiled with common_system, it uses the virtual
version. Consumer code must use the same definition to match function
signatures and avoid link errors on Windows.
@kcenon kcenon merged commit b7712c9 into main Dec 23, 2025
38 checks passed
@kcenon kcenon deleted the feature/replace-pacs-common-system-macro branch December 23, 2025 04:56
kcenon added a commit that referenced this pull request Apr 13, 2026
* refactor(macros): replace PACS_WITH_COMMON_SYSTEM with KCENON_HAS_COMMON_SYSTEM

Replace the project-specific macro PACS_WITH_COMMON_SYSTEM with the unified
KCENON_HAS_COMMON_SYSTEM macro for consistent feature flag naming across
the kcenon ecosystem.

Changes:
- Update header files (dicom_session.hpp, network_adapter.hpp,
  ai_service_connector.hpp) to use KCENON_HAS_COMMON_SYSTEM with default
  value 0 when not defined
- Update source files to use #if KCENON_HAS_COMMON_SYSTEM instead of
  #ifdef PACS_WITH_COMMON_SYSTEM
- Update CMakeLists.txt to define both KCENON_HAS_COMMON_SYSTEM=1 and
  PACS_WITH_COMMON_SYSTEM=1 for backward compatibility
- Add macro default definitions in source files that use the macro

The legacy PACS_WITH_COMMON_SYSTEM is kept as an alias during the
migration window.

Closes #401

* fix(cmake): add KCENON_HAS_COMMON_EXECUTOR for thread_system ABI compatibility

thread_system's thread_pool.h uses conditional compilation for is_running():
- KCENON_HAS_COMMON_EXECUTOR=1: virtual function with 'override'
- KCENON_HAS_COMMON_EXECUTOR=0: non-virtual function

When thread_system is compiled with common_system, it uses the virtual
version. Consumer code must use the same definition to match function
signatures and avoid link errors on Windows.
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.

Replace PACS_WITH_COMMON_SYSTEM

1 participant