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

google test #9

Open
ibtaylor opened this issue Oct 30, 2018 · 1 comment
Open

google test #9

ibtaylor opened this issue Oct 30, 2018 · 1 comment

Comments

@ibtaylor
Copy link

if(TARGET GTest::GTest)

since googletest 1.8.1, the target should be GTest::gtest, I believe. Unfortunately, the cmake (kitware) supplied module uses a different name.

TARGET_LINK_LIBRARIES(${NAME} wave_geometry GTest::Main)

GTest::gtest_main here.

I think the thought of the googletest project is to supply gmock and gtest both under the GTest cmake namespace with proper transitive dependencies, which would be difficult for the cmake (kitware) module to provide.

@leokoppel
Copy link
Collaborator

Hi, thanks for the info.

Are you seeing an error? It looks like this change would affect pre-installed gtest libraries, which I don't currently test - PRs are appreciated. The recommended method is to use a googletest source package so that libgtest can be built alongside the project-under-test with the same compiler flags. (Thus maybe it would be a good idea to remove find_package(GTest) entirely?)

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

No branches or pull requests

2 participants