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

Check for empty variables before performing REPLACE #354

Merged
merged 2 commits into from
May 30, 2023

Conversation

mjcarroll
Copy link
Contributor

🦟 Bug fix

Summary

If the CMAKE_PREFIX_PATH environment variable was empty, the string replace command could fail with (from https://github.com/gazebosim/gz-math/actions/runs/5057393702/jobs/9154388249?pr=482)

  CMake Error at /usr/share/cmake/gz-cmake3/cmake3/GzUtils.cmake:333 (string):
    string sub-command REPLACE requires at least four arguments.
  Call Stack (most recent call first):
    CMakeLists.txt:153 (gz_build_examples)

This moves the function into it's own file (to make it align with rest of the work from #344), and then checks correctly for empty variables before performing the replacement.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

mjcarroll added 2 commits May 26, 2023 20:15
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@github-actions github-actions bot added 🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic labels May 26, 2023
@ahcorde
Copy link
Contributor

ahcorde commented May 29, 2023

@osrf-jenkins run tests please!

@mjcarroll mjcarroll merged commit 9ef0c87 into gz-cmake3 May 30, 2023
@mjcarroll mjcarroll deleted the mjcarroll/fix_build_examples branch May 30, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants