You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build/CMake: private static embedding and header-only reflection reuse require TARGET_OBJECTS and property hacks #141
Part of #138 Popularity: 2/7 corpus consumers (cuda-quantum, holoscan-sdk)
Problem
Both NVIDIA consumers treat reflect-cpp as a strictly private implementation detail that must never leak into installed CMake export sets (INTERFACE_LINK_LIBRARIES) or public installed headers. However, reflect-cpp does not provide:
A clean header-only interface target (e.g. reflectcpp::headers) for TUs that only use compile-time reflection (<rfl/to_view.hpp>, <rfl/enums.hpp>, etc.) or link a parent library that already absorbed reflectcpp's objects, without re-linking duplicate static objects.
First-class support for private object absorption (OBJECT library / private embedding) without consumers reaching into $<TARGET_OBJECTS:reflectcpp> or manually compiling src/*.cpp.
Observed Downstream Workarounds
NVIDIA/cuda-quantum (90e4aa08)
cudaq/lib/Target/CMakeLists.txt#L101-L107: absorbs $<TARGET_OBJECTS:reflectcpp> directly into CUDAQTargetCatalog so reflectcpp is never exported in CUDAQTargetCatalogTargets.cmake:
# The catalog already contains reflect-cpp's objects, so take only its headers,# as system headers like linking it would.target_include_directories(TargetCatalogTestDriverSYSTEMPRIVATE
$<TARGET_PROPERTY:reflectcpp,INTERFACE_INCLUDE_DIRECTORIES>)
Activity
build(cmake): add reflectcpp::headers interface target for header-onl…
build(cmake): add reflectcpp::headers interface target for header-onl…
build(cmake): add reflectcpp::headers interface target for header-onl…
build(cmake): add reflectcpp::headers interface target for header-onl…
build(cmake): isolate bundled yyjson visibility, support external yyj…
build(cmake): isolate bundled yyjson visibility, support external yyj…
build(cmake): isolate bundled yyjson visibility, support external yyj…
build(cmake): isolate bundled yyjson visibility, support external yyj…
build(cmake): isolate bundled yyjson visibility, support external yyj…
build(cmake): isolate bundled yyjson visibility, support external yyj…