Since https://github.com/gazebosim/gz-tools/pull/128, gz-tools2 supports building with either gz-cmake3 or gz-cmake4, and colcon was correctly identifying the dependency relationship due to the cmake find_package calls. A package.xml was added in #136 with a build_depend only on gz-cmake3, which now breaks the build-from-source order for Ionic workspaces that include gz-tools2:
Starting >>> gz-cmake4
Starting >>> gz-tools2
--- output: gz-tools2
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.20348.
-- The C compiler identification is MSVC 19.29.30148.0
-- The CXX compiler identification is MSVC 19.29.30148.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:19 (message):
Could not find either gz-cmake3 or gz-cmake4
-- Configuring incomplete, errors occurred!
This pull request adds a colcon.pkg file with an explicit dependency on gz-cmake4 to fix the build order
Add <member_of_group>gz-cmake</member_of_group> to the package.xml file in gz-cmake3 and gz-cmake4 and a <group_depend>gz-cmake</group_depend> tag in downstream package.xml files (thanks to @cottsay for the suggestion). This is more elegant but requires more coordination between packages, while this colcon.pkg change can fix CI now.
Checklist
[X] 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)
[ ] 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.
🦟 Bug fix
Fixes
colcon
build ordering since #136 was mergedSummary
Since https://github.com/gazebosim/gz-tools/pull/128,
gz-tools2
supports building with eithergz-cmake3
orgz-cmake4
, andcolcon
was correctly identifying the dependency relationship due to the cmakefind_package
calls. Apackage.xml
was added in #136 with abuild_depend
only ongz-cmake3
, which now breaks the build-from-source order for Ionic workspaces that includegz-tools2
:This pull request adds a
colcon.pkg
file with an explicit dependency ongz-cmake4
to fix the build orderAlternatives considered
colcon.pkg
to force the build type back tocmake
: https://github.com/gazebosim/gz-tools/commit/f18e5846887f2e290abcbc9f5ae6e0e8fa2aed42. This also fixes the build (gz-cmake4
as a dependency.<member_of_group>gz-cmake</member_of_group>
to thepackage.xml
file ingz-cmake3
andgz-cmake4
and a<group_depend>gz-cmake</group_depend>
tag in downstream package.xml files (thanks to @cottsay for the suggestion). This is more elegant but requires more coordination between packages, while thiscolcon.pkg
change can fix CI now.Checklist
codecheck
passed (See contributing)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.