Fix test library dirs for single config generators - #270
Merged
mjcarroll merged 1 commit intoSep 30, 2026
Merged
Conversation
CMAKE_CURRENT_BINARY_DIR/$<CONFIG> only exists under a multi config generator. Ninja writes the libraries directly into the binary directory, so the PATH entry pointed at a directory that does not exist and test_convert_round_trip_py failed with ImportError: DLL load failed while importing rosidl_generator_py_s__rosidl_typesupport_c That test is the only one affected because it turns PATH into DLL directories, which is how Python 3.8+ resolves an extension module's dependencies on Windows. Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com> Assisted-by: Claude Code (Claude Opus 5)
wjwwood
approved these changes
Sep 29, 2026
Member
Author
|
Ninja (ros2/ci#900 scripts): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>only exists under a multi config generator. Ninja writes the libraries directly into the binary directory, so theAPPEND_LIBRARY_DIRSentry pointed at a directory that does not exist andtest_convert_round_trip_pyfailed with:It is the only affected test because it turns
PATHinto DLL directories, which is how Python 3.8+ resolves an extension module's dependencies on Windows. The other tests reach typesupport through the installed package.Found on ros2/ci#900, which switches Windows CI to Ninja: 46 failures in this test, none of them present in
nightly_win_rel, which still builds with the Visual Studio generator. It also affects anyone building ROS 2 on Windows with Ninja today.Is this user-facing behavior change?
No, test setup only.
Did you use Generative AI?
Yes, Claude Code (Claude Opus 5).
Additional Information
GENERATOR_IS_MULTI_CONFIGreports0under Ninja and1under Visual Studio 17 2022.Needed by ros2/ci#900.