cxxtests/cmake-scripts/external-libs.cmake
raw| 1 | # Use directly downloaded library because vcpkg's version has some |
| 2 | # linking issues with windows + clang64-msys2 |
| 3 | |
| 4 | if (DOWNLOAD_GTEST_FROM_SRC) |
| 5 | include(FetchContent) |
| 6 | FetchContent_Declare( |
| 7 | googletest |
| 8 | GIT_REPOSITORY https://github.com/google/googletest |
| 9 | GIT_TAG v1.14.0 |
| 10 | ) |
| 11 | |
| 12 | if (WIN32) |
| 13 | set(gtest_force_shared_crt ON CACHE INTERNAL "Force shared CRT") |
| 14 | endif() |
| 15 | |
| 16 | FetchContent_MakeAvailable(googletest) |
| 17 | else() |
| 18 | find_package(GTest REQUIRED) |
| 19 | endif() |