We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e6ded1 commit 802ff9fCopy full SHA for 802ff9f
test/CMakeLists.txt
@@ -7,11 +7,14 @@ set(BUILD_GMOCK OFF)
7
set(INSTALL_GTEST OFF)
8
set(gtest_force_shared_crt ON)
9
10
-FetchContent_Declare(
11
- gtest
12
- URL https://github.com/google/googletest/archive/main.tar.gz
13
-)
14
-FetchContent_MakeAvailable(gtest)
+find_package(GTest)
+if (NOT GTest_FOUND)
+ FetchContent_Declare(
+ gtest
+ URL https://github.com/google/googletest/archive/main.tar.gz
15
+ )
16
+ FetchContent_MakeAvailable(gtest)
17
+endif()
18
19
add_executable(httplib-test test.cc)
20
target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
0 commit comments