From a60bc9d2f8f9ed8e45704836542db01f832e50b8 Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Sun, 29 Oct 2023 08:43:39 +0800 Subject: [PATCH] test: copy gtest target files on Windows ... to make the test target file work. --- test/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0f4952b84b..1bd3d8823d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,5 +9,18 @@ if(BUILD_SHARED_LIBS) target_compile_definitions(rime_test PRIVATE RIME_IMPORTS) endif(BUILD_SHARED_LIBS) +if (WIN32) + add_custom_target( + copy_gtest_to_test + ${CMAKE_COMMAND} -E copy $ $ + COMMENT "Copying gtest to test" + ) + add_custom_target( + copy_gtest_main_to_test + ${CMAKE_COMMAND} -E copy $ $ + COMMENT "Copying gtest_main to test" + ) +endif() + add_test(NAME rime_test COMMAND rime_test WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/data/test")