-
Notifications
You must be signed in to change notification settings - Fork 97
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
Decouple linking to shlwapi from BUILD_TESTING #1468
Conversation
The windows builds were broken with -DBUILD_TESTING=OFF, so move the target_link_libraries call outside the `if (BUILD_TESTING)` logical block. Signed-off-by: Steve Peters <[email protected]>
testing with gz-sensors8 using a custom gazebodistro branch (see gazebo-tooling/gazebodistro@e76248c) |
@@ -49,6 +49,11 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} | |||
PRIVATE | |||
TINYXML2::TINYXML2) | |||
|
|||
if (WIN32) | |||
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to link against this library only if GZ_ENABLE_RELOCATABLE_INSTALL
is enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe InstallationDirectories.cc
is compiled unconditionally, so I think we can't avoid linking it.
an alternative suggestion from @iche033 in #1414 (comment) is to avoid using shlwapi
by copying the joinPaths
implementation from gz-common
and use std::filesystem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds like a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated implementation in #1469
Thanks for catching this error, my bad! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve this so we can merge and get CI back to green, but changing the implementation so we don't need shlwapi
sounds good.
@@ -49,6 +49,11 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} | |||
PRIVATE | |||
TINYXML2::TINYXML2) | |||
|
|||
if (WIN32) | |||
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds like a good idea.
🦟 Bug fix
Fixing test failures discussed in #1414 (comment).
Summary
The windows builds were broken with
-DBUILD_TESTING=OFF
(see #1414 (comment)), so move thetarget_link_libraries
call outside theif (BUILD_TESTING)
logical block.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.