| 1 | # |
| 2 | # SPDX-FileCopyrightText: Copyright 2024-2025 Arm Limited and/or its affiliates <open-source-office@arm.com> |
| 3 | # |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | include(FetchContent) |
| 7 | |
| 8 | # Set timestamp of extracted contents to time of extraction. |
| 9 | if(POLICY CMP0135) |
| 10 | cmake_policy(SET CMP0135 NEW) |
| 11 | endif() |
| 12 | |
| 13 | fetchcontent_declare(googletest |
| 14 | URL ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest-v1.17.0.zip |
| 15 | URL_HASH SHA256=40d4ec942217dcc84a9ebe2a68584ada7d4a33a8ee958755763278ea1c5e18ff |
| 16 | ) |
| 17 | |
| 18 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) |
| 19 | set(BUILD_GMOCK OFF CACHE BOOL "" FORCE) |
| 20 | set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) |
| 21 | |
| 22 | fetchcontent_makeavailable(googletest) |