Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable installing gtest when cmake --install #37

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/docker/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Using a non-LTS Ubuntu, just until CMake 3.24 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,
Expand Down
19 changes: 11 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# TODO Darius: Find CMake minimum required version.
neatudarius marked this conversation as resolved.
Show resolved Hide resolved
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
Expand All @@ -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)
Expand Down