From 7f1d8f648837a0bf04de4de85666890889019773 Mon Sep 17 00:00:00 2001 From: Bohdan Buinich Date: Tue, 3 Jun 2025 14:12:04 +0300 Subject: [PATCH] Fix: clean test build directory to prevent cache interference in options.cmake test Ensure a fresh test environment by removing the test build directory before running CMake test This resolves test failures on repeated runs due to cached variables --- test/unit/options.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/options.cmake b/test/unit/options.cmake index 3c23e1a7..0f781761 100644 --- a/test/unit/options.cmake +++ b/test/unit/options.cmake @@ -3,6 +3,9 @@ include(${CPM_PATH}/testing.cmake) set(TEST_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/source_dir) +# Clean previous build +file(REMOVE_RECURSE "${TEST_BUILD_DIR}") + set(TEST_DEPENDENCY_NAME Dependency) configure_package_config_file(