chore(cmake): refine test support linkage for yaze and yaze_emu
- Updated CMake configuration to conditionally link the yaze_test_support library for both yaze and yaze_emu targets, ensuring proper integration with TestManager. - Enhanced status messages to provide clearer feedback on the linkage status and potential issues if the target is not found. Benefits: - Improved clarity and maintainability of the CMake configuration. - Enhanced modularity by managing test dependencies more effectively.
This commit is contained in:
@@ -41,14 +41,12 @@ target_link_libraries(yaze PRIVATE
|
||||
absl::flags_parse
|
||||
)
|
||||
|
||||
# Link test support if tests are enabled (yaze_editor needs TestManager)
|
||||
if(YAZE_BUILD_TESTS AND TARGET yaze_test_support)
|
||||
# Link test support library (yaze_editor needs TestManager)
|
||||
if(TARGET yaze_test_support)
|
||||
target_link_libraries(yaze PRIVATE yaze_test_support)
|
||||
message(STATUS "✓ yaze executable linked to yaze_test_support")
|
||||
else()
|
||||
if(YAZE_BUILD_TESTS)
|
||||
message(WARNING "yaze needs yaze_test_support but TARGET yaze_test_support not found")
|
||||
endif()
|
||||
message(WARNING "yaze needs yaze_test_support but TARGET not found")
|
||||
endif()
|
||||
|
||||
# Platform-specific settings
|
||||
|
||||
Reference in New Issue
Block a user