Skip to content

Add quotes around conan_message output variable so it is not modified - #10388

Merged
memsharded merged 1 commit into
conan-io:developfrom
jgsogo:fix/message
Jan 24, 2022
Merged

memsharded merged 1 commit into
conan-io:developfrom
jgsogo:fix/message

Conversation

@jgsogo

@jgsogo jgsogo commented Jan 20, 2022

Copy link
Copy Markdown
Contributor

Changelog: Fix: Add quotes around conan_message output variable so it is not modified.
Docs: omit

@jgsogo jgsogo changed the title CMake messages Add quotes around conan_message output variable so it is not modified Jan 20, 2022
function(conan_message MESSAGE_TYPE MESSAGE_CONTENT)
if(NOT CONAN_CMAKE_SILENT_OUTPUT)
message(${MESSAGE_TYPE} ${MESSAGE_CONTENT})
message(${MESSAGE_TYPE} "${MESSAGE_CONTENT}")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without quotes, it removes the ; from lists... which can be very confusing when you are focused on an issue related to a list of paths 😄

return '"%s"' % ";".join(p.replace('\\', '/').replace('$', '\\$') for p in values)

self.include_paths = join_paths(cpp_info.includedirs)
self.include_path = join_paths_single_var(cpp_info.includedirs)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not used in the template (but I didn't check the if it is used in the rest of the codebase)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed seems unused, no prob

@jgsogo jgsogo added this to the 1.45 milestone Jan 20, 2022
return '"%s"' % ";".join(p.replace('\\', '/').replace('$', '\\$') for p in values)

self.include_paths = join_paths(cpp_info.includedirs)
self.include_path = join_paths_single_var(cpp_info.includedirs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed seems unused, no prob

@lasote

lasote commented Jan 24, 2022

Copy link
Copy Markdown
Contributor

Relaunched CI, failed because of the weird language change in Windows CI.

@lasote
lasote marked this pull request as ready for review January 24, 2022 12:44
@memsharded
memsharded merged commit 652fc21 into conan-io:develop Jan 24, 2022
@jgsogo
jgsogo deleted the fix/message branch January 25, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants