From b8292da025eada2c054f1c012cbfbd8a522d370a Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 15 Mar 2025 13:33:05 +0100 Subject: [PATCH] cmake: Fix bug not enabling test wrapper for running minimal tests when cross compiling The test wrapper needs to be enabled for running any test when cross compiling. --- cmake/modules/Macros.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index 14d06c24..6a2b978b 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -1,6 +1,6 @@ option(DBUS_USE_WINE "set to 1 or ON to support running test cases with Wine" OFF) -if((DBUS_ENABLE_MODULAR_TESTS OR DBUS_ENABLE_INTRUSIVE_TESTS) AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows") +if(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows") if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") find_file(WINE_EXECUTABLE NAMES wine @@ -35,6 +35,7 @@ if((DBUS_ENABLE_MODULAR_TESTS OR DBUS_ENABLE_INTRUSIVE_TESTS) AND CMAKE_CROSSCOM set(Z_DRIVE_IF_WINE "z:") if(DBUS_USE_WINE AND WINE_EXECUTABLE) set(TEST_WRAPPER "${WINE_EXECUTABLE}") + message(STATUS "Using wrapper for running tests: ${TEST_WRAPPER}") endif() endif()