Files
yaze/src/app/test/test.cmake
scawful e523ce94da chore(cmake): enhance test support linkage and file dialog functionality
- Improved the CMake configuration to conditionally link the yaze_test_support library for the yaze target when tests are enabled, providing clearer feedback on linkage status.
- Updated the file dialog implementation to include specific filters for ROM files and all files, enhancing user experience during file selection.
- Added status messages to inform users about the linkage of test support and potential issues if the target is not found.

Benefits:
- Enhanced clarity and maintainability of the CMake configuration.
- Improved user interaction with file dialogs through better filtering options.
2025-10-11 13:29:24 -04:00

59 lines
1.9 KiB
CMake

# ==============================================================================
# Yaze Test Support Library
# ==============================================================================
# This library contains the core test manager and infrastructure for running
# tests within the application.
#
# It is intended to be linked by test executables, not by the main
# application itself.
#
# Dependencies: All major yaze libraries.
# ==============================================================================
set(YAZE_TEST_SOURCES
app/test/test_manager.cc
app/test/z3ed_test_suite.cc
)
add_library(yaze_test_support STATIC ${YAZE_TEST_SOURCES})
target_precompile_headers(yaze_test_support PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/src/yaze_pch.h>"
)
target_include_directories(yaze_test_support PUBLIC
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/incl
${CMAKE_SOURCE_DIR}/src/lib
${PROJECT_BINARY_DIR}
)
target_link_libraries(yaze_test_support PUBLIC
yaze_editor
yaze_core_lib
yaze_gui
yaze_zelda3
yaze_gfx
yaze_util
yaze_common
)
# Link agent library if available (for z3ed test suites)
# yaze_agent contains all the CLI service code (tile16_proposal_generator, gui_automation_client, etc.)
if(TARGET yaze_agent)
target_link_libraries(yaze_test_support PUBLIC yaze_agent)
if(YAZE_WITH_GRPC)
message(STATUS "✓ z3ed test suites enabled with gRPC support")
else()
message(STATUS "✓ z3ed test suites enabled (without gRPC)")
endif()
else()
message(STATUS "○ z3ed test suites disabled (yaze_agent not built)")
endif()
message(STATUS "✓ yaze_test_support library configured")
# Note: yaze_editor needs yaze_test_support for TestManager, but we can't link it here
# because this happens BEFORE yaze and yaze_emu are configured.
# Instead, each executable (yaze, yaze_emu) must explicitly link yaze_test_support
# in their respective .cmake files (app.cmake, emu.cmake).