Skip to content

Commit

Permalink
This addresses tests on MSys compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Jan 6, 2024
1 parent a3103d6 commit a730206
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ target_link_libraries(
include(GoogleTest)
gtest_add_tests(TARGET test_executables)

if (WIN32)
if (MSVC)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_custom_command(TARGET test_executables POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "../bin/Debug/gtest.dll" "./Debug/"
Expand All @@ -54,4 +54,9 @@ if (WIN32)
COMMAND ${CMAKE_COMMAND} -E copy "../bin/Release/gtest_main.dll" "./Release/"
)
endif()
elseif(MSYS)
add_custom_command(TARGET test_executables POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest.dll" "./"
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest_main.dll" "./"
)
endif()

0 comments on commit a730206

Please sign in to comment.