File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,10 +251,10 @@ endif()
251251# Build-only helpers must not leak into exported interfaces.
252252# --------------------------------------------------------------------
253253if (TARGET vix_warnings)
254- if (VIX_HEADER_ONLY)
255- # Do not export build-only warning helpers from header-only package targets.
256- else ()
257- target_link_libraries ( vix_utils PRIVATE vix_warnings )
254+ if (NOT VIX_HEADER_ONLY)
255+ target_link_libraries ( vix_utils PRIVATE
256+ $< BUILD_INTERFACE : vix_warnings >
257+ )
258258 endif ()
259259else ()
260260 if (VIX_HEADER_ONLY)
@@ -289,10 +289,10 @@ else()
289289endif ()
290290
291291if (VIX_ENABLE_SANITIZERS AND TARGET vix_sanitizers)
292- if (VIX_HEADER_ONLY)
293- # Do not export build-only sanitizer helpers from header-only package targets.
294- else ()
295- target_link_libraries ( vix_utils PRIVATE vix_sanitizers )
292+ if (NOT VIX_HEADER_ONLY)
293+ target_link_libraries ( vix_utils PRIVATE
294+ $< BUILD_INTERFACE : vix_sanitizers >
295+ )
296296 endif ()
297297endif ()
298298
You can’t perform that action at this time.
0 commit comments