Skip to content

Commit

Permalink
[CI] fix windows gtest thread link error
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyiwu committed Jul 30, 2024
1 parent 6da22e1 commit 9d326e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
Expand Down
5 changes: 5 additions & 0 deletions test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ ADD_EXECUTABLE(test.run
#TThread.cpp
#TThreadPool.cpp
)
if (MSVC)
#set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL")
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()

TARGET_LINK_LIBRARIES(test.run gtest)

#include(GoogleTest)
Expand Down

0 comments on commit 9d326e8

Please sign in to comment.