Skip to content

Commit

Permalink
Simplify CMakeLists.txt
Browse files Browse the repository at this point in the history
The `block()` isn't needed since we can set CMake options
via. CMAKE_ARGS.
  • Loading branch information
camio committed Oct 2, 2024
1 parent 0ac15db commit 1fb6b07
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ include(FetchContent)
if(BUILD_TESTING)
enable_testing()

block()
# Disable installing google test dependency on cmake --install
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()
# 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
-DINSTALL_GTEST=OFF
)
FetchContent_MakeAvailable(googletest)
endif()

add_subdirectory(src/beman/exemplar)
Expand Down

0 comments on commit 1fb6b07

Please sign in to comment.