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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
Reference in New Issue
Block a user