What
Enable LOGGER_USE_THREAD_SYSTEM=ON in vcpkg build mode so that logger_system
can use thread_system's thread pool executor instead of falling back to the
standalone std::jthread-based executor.
Currently the vcpkg portfile forces -DLOGGER_USE_THREAD_SYSTEM=OFF as a
workaround for unresolved externals when linking thread_pool symbols.
Why
When LOGGER_USE_THREAD_SYSTEM=OFF, logger_system falls back to its standalone
async executor. This means:
- Users who install both
kcenon-logger-system and kcenon-thread-system via
vcpkg cannot benefit from thread_system's optimized thread pool (work stealing,
lock-free queues) for log dispatch.
- The
monitoring_system and network_system portfiles that depend on both
logger_system and thread_system cannot achieve unified thread management.
The root cause is a CMake export/config issue, not an architectural problem:
logger_system-config.cmake.in uses find_dependency(thread_system QUIET) —
silent failure masks missing dependency.
- Transitive dependency propagation in the export set may be incomplete when
thread_system sub-targets (e.g., thread_base) are not fully declared.
Where
CMakeLists.txt — lines 408–450 (thread_system linking logic)
cmake/logger_system-config.cmake.in — lines 20–31 (find_dependency calls)
- vcpkg portfile:
vcpkg-registry/ports/kcenon-logger-system/portfile.cmake line 23
How
Acceptance Criteria
Technical Approach
-
Fix logger_system-config.cmake.in: Change find_dependency(thread_system QUIET)
to find_dependency(thread_system CONFIG REQUIRED) when LoggerSystem_USE_THREAD_SYSTEM
is ON, ensuring transitive dependencies are resolved at consume-time.
-
Verify export set: Ensure install(TARGETS ... EXPORT logger_system-targets) properly
includes the PUBLIC dependency on thread_system when it is an IMPORTED target.
-
Update portfile: Remove -DLOGGER_USE_THREAD_SYSTEM=OFF override and add
kcenon-thread-system as a required dependency in the port's vcpkg.json.
-
CI verification: Add a consumer integration test that links both logger_system and
thread_system and calls logger APIs.
Related
- vcpkg portfile workaround:
vcpkg-registry/ports/kcenon-logger-system/portfile.cmake:12-23
- thread_system config:
thread_system/cmake/thread_system-config.cmake.in
- Previous bidirectional dependency resolution:
CMakeLists.txt:209-221
What
Enable
LOGGER_USE_THREAD_SYSTEM=ONin vcpkg build mode so that logger_systemcan use thread_system's thread pool executor instead of falling back to the
standalone
std::jthread-based executor.Currently the vcpkg portfile forces
-DLOGGER_USE_THREAD_SYSTEM=OFFas aworkaround for unresolved externals when linking thread_pool symbols.
Why
When
LOGGER_USE_THREAD_SYSTEM=OFF, logger_system falls back to its standaloneasync executor. This means:
kcenon-logger-systemandkcenon-thread-systemviavcpkg cannot benefit from thread_system's optimized thread pool (work stealing,
lock-free queues) for log dispatch.
monitoring_systemandnetwork_systemportfiles that depend on bothlogger_system and thread_system cannot achieve unified thread management.
The root cause is a CMake export/config issue, not an architectural problem:
logger_system-config.cmake.inusesfind_dependency(thread_system QUIET)—silent failure masks missing dependency.
thread_system sub-targets (e.g.,
thread_base) are not fully declared.Where
CMakeLists.txt— lines 408–450 (thread_system linking logic)cmake/logger_system-config.cmake.in— lines 20–31 (find_dependency calls)vcpkg-registry/ports/kcenon-logger-system/portfile.cmakeline 23How
Acceptance Criteria
-DLOGGER_USE_THREAD_SYSTEM=ONsucceeds on all CI platformsfind_package(logger_system)and link without unresolved symbolsLOGGER_HAS_THREAD_SYSTEMcompile definition is propagated to consumersTechnical Approach
Fix
logger_system-config.cmake.in: Changefind_dependency(thread_system QUIET)to
find_dependency(thread_system CONFIG REQUIRED)whenLoggerSystem_USE_THREAD_SYSTEMis ON, ensuring transitive dependencies are resolved at consume-time.
Verify export set: Ensure
install(TARGETS ... EXPORT logger_system-targets)properlyincludes the PUBLIC dependency on thread_system when it is an IMPORTED target.
Update portfile: Remove
-DLOGGER_USE_THREAD_SYSTEM=OFFoverride and addkcenon-thread-systemas a required dependency in the port'svcpkg.json.CI verification: Add a consumer integration test that links both logger_system and
thread_system and calls logger APIs.
Related
vcpkg-registry/ports/kcenon-logger-system/portfile.cmake:12-23thread_system/cmake/thread_system-config.cmake.inCMakeLists.txt:209-221