Skip to content

Commit

Permalink
Merge pull request #305 from traversaro/patch-7
Browse files Browse the repository at this point in the history
Fix link to GTest if GTest is found via find_package
  • Loading branch information
artivis authored Aug 12, 2024
2 parents bf9c71d + 8e3ef4b commit de52f8b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ endif()
# small helper function
function(manif_add_gtest target)
add_executable(${target} ${ARGN})
add_dependencies(${target} gtest)
target_link_libraries(${target} ${PROJECT_NAME} gtest)
target_link_libraries(${target} ${PROJECT_NAME} GTest::gtest)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# GCC is not strict enough by default, so enable most of the warnings.
Expand Down

0 comments on commit de52f8b

Please sign in to comment.