Update CMake configuration to enhance test suite management
- Modified `CMakeLists.txt` to cache the `YAZE_BUILD_TESTS` option, improving clarity in test suite configuration. - Updated the GitHub Actions workflow to include verification steps for the CMake configuration, ensuring that test targets are correctly identified. - Adjusted test discovery logic in `test/CMakeLists.txt` to double-check that tests are enabled, enhancing the robustness of the build process.
This commit is contained in:
@@ -12,7 +12,8 @@ foreach (file
|
||||
endforeach()
|
||||
|
||||
# Only build test executable if tests are enabled
|
||||
if(YAZE_BUILD_TESTS)
|
||||
# Double-check to ensure tests are actually enabled
|
||||
if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
|
||||
# Main test executable with enhanced argument handling for AI agents
|
||||
# Use CI version for minimal builds, full version for development
|
||||
if(YAZE_MINIMAL_BUILD)
|
||||
@@ -218,7 +219,7 @@ endif()
|
||||
|
||||
# Configure test discovery with efficient labeling for CI/CD
|
||||
# Only discover tests if tests are enabled
|
||||
if(YAZE_BUILD_TESTS)
|
||||
if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
|
||||
include(GoogleTest)
|
||||
|
||||
# Discover all tests with default properties
|
||||
|
||||
Reference in New Issue
Block a user