File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ endif()
7474# Tests
7575option (BUILD_SLICK_SOCKET_TESTING "Build tests" ON )
7676if (BUILD_SLICK_SOCKET_TESTING)
77- find_package (GTest CONFIG REQUIRED)
7877 enable_testing ()
7978 add_subdirectory (tests)
8079endif ()
Original file line number Diff line number Diff line change 11# Tests CMakeLists.txt
22
3+ find_package (GTest CONFIG REQUIRED)
4+
5+ if (NOT GTest_FOUND)
6+ include (FetchContent)
7+ FetchContent_Declare(
8+ googletest
9+ URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
10+ )
11+ # For Windows: Prevent overriding the parent project's compiler/linker settings
12+ set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
13+ FetchContent_MakeAvailable(googletest)
14+ endif ()
15+
316# Include Google Test
417include (GoogleTest)
518
You can’t perform that action at this time.
0 commit comments