From a07c06aad3722d4f6cbd65bf29a37f3260f639c7 Mon Sep 17 00:00:00 2001 From: Brad Wu <26424577+wusatosi@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:23:13 -0400 Subject: [PATCH 1/2] disable INSTALL_GTEST --- .ci/docker/ubuntu.Dockerfile | 2 +- CMakeLists.txt | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.ci/docker/ubuntu.Dockerfile b/.ci/docker/ubuntu.Dockerfile index 8741084..72f8b3c 100644 --- a/.ci/docker/ubuntu.Dockerfile +++ b/.ci/docker/ubuntu.Dockerfile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# Using a non-LTS Ubuntu, just until CMake 3.23 is available on Ubuntu 24.04. +# Using a non-LTS Ubuntu, just until CMake 3.25 is available on Ubuntu 24.04. FROM ubuntu:23.10 # Install dependencies, diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c1642a..5e5f8ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # TODO Darius: Find CMake minimum required version. -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.25) project( beman.exemplar # CMake Project Name, which is also the name of the top-level @@ -15,13 +15,16 @@ include(FetchContent) if(BUILD_TESTING) enable_testing() - # Fetch GoogleTest - FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0 - EXCLUDE_FROM_ALL CMAKE_ARGS -DBUILD_TESTING=OFF) - FetchContent_MakeAvailable(googletest) + block() + set(INSTALL_GTEST OFF) + # Fetch GoogleTest + FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0 + EXCLUDE_FROM_ALL CMAKE_ARGS -DBUILD_TESTING=OFF) + FetchContent_MakeAvailable(googletest) + endblock() endif() add_subdirectory(src/beman/exemplar) From 0165e0584b3ef099bb8a5c7e04d830495525af73 Mon Sep 17 00:00:00 2001 From: Brad Wu <26424577+wusatosi@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:51:50 -0400 Subject: [PATCH 2/2] update comments --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e5f8ed..828ed70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# TODO Darius: Find CMake minimum required version. cmake_minimum_required(VERSION 3.25) project( @@ -16,7 +15,9 @@ if(BUILD_TESTING) enable_testing() block() + # Disable installing google test dependency on cmake --install set(INSTALL_GTEST OFF) + # Fetch GoogleTest FetchContent_Declare( googletest