Skip to content

Commit

Permalink
configure gtest with gtest_force_shared_crt
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Sep 6, 2019
1 parent f21f3c0 commit 1063a3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ endif(OBJLISTMODEL_USE_NAMESPACE)
# └──────────────────────────────────────────────────────────────────┘

if(OBJLISTMODEL_ENABLE_TESTS)
FetchContent_MakeAvailable(gtest)
include(${CMAKE_CURRENT_SOURCE_DIR}/CTestLists.txt)
endif(OBJLISTMODEL_ENABLE_TESTS)

Expand Down
3 changes: 3 additions & 0 deletions CTestLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ enable_testing()
# We need QSignalSpy
FIND_PACKAGE(Qt5Test CONFIG REQUIRED)

set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(gtest)

set(OBJLISTMODEL_TEST_TARGET ${OBJLISTMODEL_TESTS_PREFIX}_Tests)

set(OBJLISTMODEL_TEST_TARGET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
Expand Down

0 comments on commit 1063a3d

Please sign in to comment.