Skip to content

Commit

Permalink
Remove CMAKE_ARGS parameter that wasn't working.
Browse files Browse the repository at this point in the history
CMAKE_ARGS isn't used when a directory is brought in via
`add_subdirectory`. Instead, variables need to be set in a block.
Additionally, the block is only needed for the
`FetchContent_MakeAvailable` call.
  • Loading branch information
camio committed Oct 8, 2024
1 parent 1fb6b07 commit d5b1e63
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ if(BUILD_TESTING)
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)
)
block()
set(INSTALL_GTEST OFF) # Disable GoogleTest installation
set(BUILD_TESTING OFF) # Disable GoogleTest tests
FetchContent_MakeAvailable(googletest)
endblock()
endif()

add_subdirectory(src/beman/exemplar)
Expand Down

0 comments on commit d5b1e63

Please sign in to comment.