Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Add the GoogleTest package to hunter. #306

Merged
merged 12 commits into from Jan 31, 2016
Merged

Add the GoogleTest package to hunter. #306

merged 12 commits into from Jan 31, 2016

Conversation

Knitschi
Copy link
Contributor

The changes add the GoogleTest hunter package to hunter.

The package can be used with:

# file CMakeLists.txt

hunter_add_package(GoogleTest)
find_package(gtest CONFIG REQUIRED)  # when only gtest is needed
find_package(gmock CONFIG REQUIRED)  # when gmock and gtest is needed
...
# link libraries as needed
target_link_libraries( 
  MyExe PUBLIC 
  gtest::gtest 
  gtest::gtest_main 
  gmock::gmock 
  gmock::gmock_main 
) 

@ruslo
Copy link
Owner

ruslo commented Jan 16, 2016

The package can be used with

I think interface should not change and package should be called GTest. See my note:

@Knitschi
Copy link
Contributor Author

Oh damn I just read the you wanted me to change the name to GTest. I will do this first.

@ruslo
Copy link
Owner

ruslo commented Jan 16, 2016

Oh damn I just read the you wanted me to change the name to GTest. I will do this first.

Cool, thank you

@ruslo
Copy link
Owner

ruslo commented Jan 16, 2016

@Knitschi Also we need to apply some patches (will do it after your pull request) from GTest since it fixes different build bugs: https://github.com/hunter-packages/gtest/commits?author=ruslo. I remember that Windows build is tricky, some version works for Visual Studio and doesn't work for MinGW, updated version works for MinGW but doesn't work for Visual Studio...

@Knitschi
Copy link
Contributor Author

Should I replace the old GTest project with the new GoogleTest project or leave it as it is?

@ruslo
Copy link
Owner

ruslo commented Jan 16, 2016

Should I replace the old GTest project with the new GoogleTest project or leave it as it is?

I'm not sure about it, I think yes. Also probably it make sense to add this version to existent GTest/hunter.cmake.

@Knitschi
Copy link
Contributor Author

How do you test the builds for package on various platforms. Can the build server do that or does it only run the buildchains that are available on osx?

I am not sure how I can test the build for vs 2008 as I don't have a license for that version.

@ruslo
Copy link
Owner

ruslo commented Jan 26, 2016

How do you test the builds for package on various platforms

Same script for all toolchains: https://github.com/ruslo/hunter/wiki/dev.hunter.root#jenkinspy
Also note that GTest build failed for me without using Hunter at all.

Can the build server do that or does it only run the buildchains that are available on osx?

Yes for now, but few improvements are possible: https://github.com/ruslo/hunter/issues/180

I don't have a license for that version

I think there are free versions available: http://programmers.stackexchange.com/a/105159/116664 should be quite enough.

@ruslo
Copy link
Owner

ruslo commented Jan 26, 2016

Can the build server do that or does it only run the buildchains that are available on osx?

Unfortunately AppVeyor doesn't have 2005 studio: http://www.appveyor.com/docs/installed-software#visual-studio-2008. So there is no easy way to test vs-8-2005 toolchain automatically (unless somebody want to start custom jenkins server).

@Knitschi
Copy link
Contributor Author

Update! The new version does not support MinGW and MSVC80. It also uses the newer release of the googletest package.

@ruslo
Copy link
Owner

ruslo commented Jan 29, 2016

@Knitschi
Copy link
Contributor Author

Do you know what went wrong with the build? To me it looks like it has nothing to do with googletest.

@ruslo
Copy link
Owner

ruslo commented Jan 29, 2016

@Knitschi re:{Do you know what went wrong with the build} see hunter-packages/googletest#5

@ruslo
Copy link
Owner

ruslo commented Jan 30, 2016

@Knitschi Hi, I see you've updated this pull request. Just for your information I'm not receiving updates about such events :) http://0.readthedocs.org/en/latest/git.html#notify

@ruslo
Copy link
Owner

ruslo commented Jan 30, 2016

@Knitschi I've updated testing procedure. CI for this pull request:

@Knitschi
Copy link
Contributor Author

So the GTest builds started by travis have worked, right? But what does the blue bar mean for the AppVeyor builds?

@ruslo
Copy link
Owner

ruslo commented Jan 30, 2016

So the GTest builds started by travis have worked, right?

Just an example from Hunter, not testing from GTest repository (it's not the goal).

But what does the blue bar mean for the AppVeyor builds?

Waiting. I've created a lot of branches: https://github.com/ingenue/hunter/branches/all?page=1

ruslo added a commit that referenced this pull request Jan 31, 2016
Add the GoogleTest package to hunter.
@ruslo ruslo merged commit fcf850e into ruslo:develop Jan 31, 2016
@ruslo
Copy link
Owner

ruslo commented Jan 31, 2016

All tests passed, merging.

@Knitschi great job, thank you!

@ruslo
Copy link
Owner

ruslo commented Jan 31, 2016

@Knitschi
Copy link
Contributor Author

Knitschi commented Feb 1, 2016

You are welcome. And thanks for the support. When I need another dependency for my code-base I will add it to hunter too.

norbertwenzel pushed a commit to NeroBurner/hunter that referenced this pull request Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants