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

Find a better way of dealing with internal copies of gtest and backwards #477

Open
j-rivero opened this issue Feb 20, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@j-rivero
Copy link
Contributor

Desired behavior

Eliminate the embedded copies of gtest and backwards from the gz libraries and centralize.
Context in the conversation thread gazebosim/gz-sim#2776 (comment)

Having the libraries vendored in the packages has an impact in the size and number of files in the repositories, downloading times and specially in how we maintain them.

Alternatives considered

Keep maintaining the embedded copies.

Implementation suggestion

For gtest

We probably need to add the find_package to gz-cmake and rework the CMakeLists.txt in the consumers of gz-cmake.

For backwards test compatibility

We could add some CMake code to gz-cmake that handles: the optional use of backward-cpp, the look for the system support or internal vendoring (to keep support for gz-utils/gz-launch) and the extra linking needed. Maybe creating a new FEATURES block for the gz_build_tests, something like:

gz_build_tests(TYPE UNIT
  SOURCES
     ${gtest_sources}
  LIB_DEPS
     ....
  FEATURES
     USE_BACKWARDS_CPP=ON

Other context

Important to note that not all distributions have backwards-cpp packages (like Fedora). Specially important for us is the lack of it in Brew for Mac. Either send the a new Formula to HomebreCask or implement a feature to grab the sources using FetchContent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Inbox
Development

No branches or pull requests

1 participant