Skip to content

Commit

Permalink
#2174: tests: only add gtest if it doesn't exist already
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Aug 9, 2023
1 parent eb5bd94 commit 7b04089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ subdirlist(
set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" FORCE)

add_subdirectory(extern/googletest)
if (NOT TARGET gtest)
add_subdirectory(extern/googletest)
endif()
set(GOOGLETEST_LIBRARY gtest)
set_darma_compiler_flags(${GOOGLETEST_LIBRARY})

Expand Down

0 comments on commit 7b04089

Please sign in to comment.