Skip to content

Commit

Permalink
Fix link to GTest if GTest is found via find_package
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Aug 11, 2024
1 parent bf9c71d commit 8e3ef4b
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 8e3ef4b

Please sign in to comment.