Merge pull request #10101 from JJenkx/windows/patched-libs-test-path

test(libs): give patched_libraries the MinGW runtime on its PATH
This commit is contained in:
Adrià authored and GitHub committed 2026-10-26 15:33:32 +01:00
commit 2dbe9b99f5
1 file changed
+5
+5
View File
@@ -364,6 +364,11 @@ if(BUILD_TESTING)
target_link_options(patched_libraries_tests PRIVATE -static -static-libgcc -static-libstdc++)
endif()
add_test(NAME patched_libraries COMMAND patched_libraries_tests ${PATCHED_DIR})
if(MINGW)
get_filename_component(patchedLibrariesRuntimeDirectory "${CMAKE_CXX_COMPILER}" DIRECTORY)
set_tests_properties(patched_libraries PROPERTIES
ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${patchedLibrariesRuntimeDirectory}")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_library(host_libstdcxx_exception_module SHARED tests/HostLibstdcxxExceptionModule.cpp)
target_link_libraries(host_libstdcxx_exception_module PRIVATE ${PATCHED_DIR}/libc.prx)