examples
examples copied to clipboard
Add GTest example
An user from Stack Overflow is following https://github.com/lasote/conan-gtest-example. Since it's an example, I've moved it to here.
New documentation for GTest: https://github.com/conan-io/docs/pull/1668
Do we talk about it in our docs? IMO every example here should have a reason: it is in our docs or it demonstrates some feature; otherwise CI times will grow and maintenance could be a problem
we are using it indeed https://docs.conan.io/en/latest/integrations/ci/appveyor.html#building-and-testing-your-project
I just rebased it now, let's see the result
This example in the docs is about the appveyor.yml file (which we are not copying here, neither using it). Maybe it requires a standalone repo like this one https://github.com/conan-io/hello
I don't like the idea separating all examples again. Rarely are the users which know about hello repo.
I totally agree that we shouldn't separate the examples, but for this one we need to run the actual appveyor.yml file, otherwise we are just testing the gtest package which is something we are already doing in c3i.
And, I've just realized we have a bug in the example file, it says cmmd instead of cmd 😮
mac build failed but the error is not known to me
I tried to reproduce on MacInCloud and did happen. I'll try one more test to validate. My guess is a runtime error related to dynamic library.
The problem is not detecting the compiler, according to this list here (https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-11.x(since_Free_On-Device_Development)) there is no apple-clang 10.13. It refers to the macOS version...
Just as a reference, I've been trying the example locally and using DYLD_... && cmake --build XXXX --target test doesn't work, you need to add that variable to the environment for the given target in CMake:
set_property(TEST encryption PROPERTY ENVIRONMENT "DYLD_LIBRARY_PATH=${GTest_LIB_DIRS}")
@jgsogo Thanks a lot! You and @SSE4 are helping a lot, without you supports it wouldn't be possible!
Did you manage to fix this issue? We can try to finish this PR
Hello,
I'm interested by a conan 2.0 example project using some tests written with GTest outside of test_package as described in "A different approach " of https://github.com/lasote/conan-gtest-example#synopsis. The ideal would be to have a simple invocation of conan as "conan create . ...". With CMakeToolchain which seems the new way to use conan with CMake. Currently I have error of https://stackoverflow.com/questions/42162014/gtest-installed-with-conan-undefined-reference and proposed answer doesn't works.
Regards.
@EstebanDugueperoux2 you want to refer to the examples repo for Conan 2.0: https://github.com/conan-io/examples2
@EstebanDugueperoux2 you want to refer to the examples repo for Conan 2.0: https://github.com/conan-io/examples2
Yes, I'll try to submit a little example through a pull request showing my issue. Otherwise, is it normal to have a 404 Not Found when clicking on "Edit on GitHub" (top right corner) in https://docs.conan.io/en/2.0-alpha/tutorial/consuming_packages/build_simple_cmake_project.html?
Regards.
Yes, that link is broken for 2.0 docs, we would need to fix it