Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link to GTest if GTest is found via find_package #305

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Aug 11, 2024

Thanks @artivis for the new tag! I was updating the release in conda-forge, and I took the occasion to re-enable the tests there on Windows.

I noticed that the 0.0.5 for us build was failing with an error related to gtest:

CMake Error at test/CMakeLists.txt:37 (add_dependencies):
  The dependency target "gtest" of target "gtest_misc" does not exist.
Call Stack (most recent call first):
  test/CMakeLists.txt:53 (manif_add_gtest)


CMake Error at test/CMakeLists.txt:37 (add_dependencies):
  The dependency target "gtest" of target "gtest_rn" does not exist.
Call Stack (most recent call first):
  test/rn/CMakeLists.txt:3 (manif_add_gtest)

So I took the occasion to cleanup the linking to gtest. I used GTest::gtest as imported target to link against, and remove the add_dependencies step as it is implicit in target_link_libraries.

@artivis artivis self-assigned this Aug 12, 2024
Copy link
Owner

@artivis artivis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @traversaro 👍

@artivis artivis merged commit de52f8b into artivis:devel Aug 12, 2024
39 checks passed
@artivis
Copy link
Owner

artivis commented Aug 12, 2024

@traversaro do you need a new release tho?

@traversaro
Copy link
Contributor Author

@traversaro do you need a new release tho?

No, we typically do not run tests on Windows, I just did this on conda-forge and there I can use a simple patch.

@artivis
Copy link
Owner

artivis commented Aug 12, 2024

Gotcha, thanks for the prompt reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants