mpark / variant

C++17 `std::variant` for C++11/14/17
https://mpark.github.io/variant
Boost Software License 1.0
659 stars 88 forks source link

Issues packaging with conan.io #39

Closed jgsogo closed 6 years ago

jgsogo commented 6 years ago

Hi!

I'm trying to package this library (v1.3.0) using conan.io, you can see my ongoing work in this repo and I want to share with you some issues I'm facing, just in case you have an opinion about them.

As the idea is to work with packaged dependencies, I am not using the 3rdparty directory with the submodules but the gtest package provided by bincrafters (release-v1.8.0). Two comments when using this packaged library:

If you are interested on having this library packaged with conan, I can work further on this and create a PR, otherwise I will keep using these workarounds.

PD.- btw, I came to your library following the dependencies being used by spdlog_setup.

mpark commented 6 years ago

Thanks for the report and feedback!

I currently poke into the internal_utils.cmake file only because when I compile with no exceptions and such, as far as I understand gtest needs to be compiled with the same compiler flags as the tests themselves.

I don't think I understand exactly what the gtest_main / gtest problem is. Could you elaborate?

My plan ultimately is to switch over to use Catch2 rather than gtest.

jgsogo commented 6 years ago

About gtest_main/gtest:

In googletest sources here:

cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)

and watching the sources, gtest is the library itself and gtest_main is more like the executable (see source for gtest_main.cc).

mpark commented 6 years ago

I think I'll ditch gtest all-together shortly. Could you keep the workarounds for now and remove them once I ditch gtest?

jgsogo commented 6 years ago

Yes, of course. Just ping me when you release the new version.

Thanks!

mpark commented 6 years ago

@jgsogo: Closing for now. Will ping when I get around to ditching gtest.