From 44171d6972cbb29b8df7f6c8632705095e30174a Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 11 Oct 2025 11:50:22 -0400 Subject: [PATCH] chore(cmake): update test support linkage in CMake configuration - Removed direct linkage of yaze_test_support in the yaze target when tests are enabled, as it is now included transitively through yaze_editor. - Added linkage of yaze_editor to yaze_test_support to facilitate TestManager usage, ensuring test dependencies are managed privately. Benefits: - Simplified CMake configuration by reducing direct dependencies. - Enhanced modularity and maintainability of test support in the editor. --- src/app/app.cmake | 4 +--- src/app/test/test.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/app.cmake b/src/app/app.cmake index e8c93bd5..7a7a1793 100644 --- a/src/app/app.cmake +++ b/src/app/app.cmake @@ -41,9 +41,7 @@ target_link_libraries(yaze PRIVATE absl::flags_parse ) -if(YAZE_BUILD_TESTS AND TARGET yaze_test_support) - target_link_libraries(yaze PRIVATE yaze_test_support) -endif() +# Note: yaze gets yaze_test_support transitively through yaze_editor when tests are enabled # Platform-specific settings if(WIN32) diff --git a/src/app/test/test.cmake b/src/app/test/test.cmake index 03934ca2..5485123a 100644 --- a/src/app/test/test.cmake +++ b/src/app/test/test.cmake @@ -51,4 +51,11 @@ else() message(STATUS "○ z3ed test suites disabled (yaze_agent not built)") endif() +# Link yaze_editor back to yaze_test_support (for TestManager usage in editor_manager.cc) +# Use PRIVATE linkage to avoid propagating test dependencies to editor consumers +if(TARGET yaze_editor) + target_link_libraries(yaze_editor PRIVATE yaze_test_support) + message(STATUS "✓ yaze_editor linked to yaze_test_support for TestManager access") +endif() + message(STATUS "✓ yaze_test_support library configured") \ No newline at end of file