We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afa7725 commit 7a97594Copy full SHA for 7a97594
1 file changed
src/tests/CMakeLists.txt
@@ -58,4 +58,12 @@ if(WIN32)
58
# build can locate it at launch (there is no rpath on Windows).
59
set_tests_properties(ReadInterrupt PROPERTIES
60
WORKING_DIRECTORY "$<TARGET_FILE_DIR:${HIDAPI_TEST_BACKEND}>")
61
+
62
+ # When built with ASan (MSVC), the test exe needs the ASan runtime DLL,
63
+ # which lives next to the MSVC tools; add it to PATH (CMake >= 3.22).
64
+ if(HIDAPI_ENABLE_ASAN AND MSVC AND NOT CMAKE_VERSION VERSION_LESS "3.22")
65
+ get_filename_component(MSVC_BUILD_TOOLS_DIR "${CMAKE_LINKER}" DIRECTORY)
66
+ set_property(TEST ReadInterrupt PROPERTY
67
+ ENVIRONMENT_MODIFICATION "PATH=path_list_append:${MSVC_BUILD_TOOLS_DIR}")
68
+ endif()
69
endif()
0 commit comments