-
Notifications
You must be signed in to change notification settings - Fork 991
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
relocatable full_deploy CMake #13526
relocatable full_deploy CMake #13526
Conversation
for varname, varvalues in self._values.items(): | ||
value = varvalues.get_str("%{name}%", subsystem=self._subsystem, pathsep=self._pathsep) | ||
# To make the script relocatable | ||
value = value.replace(location, "%~dp0") |
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.
This was easy to make Env generators to be relocatable for Windows/.bat, but it is challenging to do for .sh in Linux, due to not existing a generic pure shell (no bash only) solution
else: | ||
updates[prop_name] = os.path.join(folder, value) | ||
component._generator_properties.update(updates) | ||
properties = component._generator_properties |
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.
This was a minor refactor, no need to iterate all properties, if only 1 used ( I had to do the same below)
@@ -15,8 +17,30 @@ | |||
def test_install_deploy(): | |||
c = TestClient() | |||
c.run("new cmake_lib -d name=hello -d version=0.1") | |||
c.run("create . -o *:shared=True -tf=") | |||
conanfile = textwrap.dedent(""" |
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.
Adding an actual executable script to the test, to proof the final deploy is relocatable
Changelog: Feature: The
full_deploy
deployer together withCMakeDeps
generator learned to create relative paths deploys, so they are relocatable.Docs: Omit
Close #13511