-
-
Notifications
You must be signed in to change notification settings - Fork 641
Escape spaces in rpath with quotes #2433
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
base: master
Are you sure you want to change the base?
Conversation
src/tools/gcc.lua
Outdated
|
|
||
| for _, fullpath in ipairs(dirs) do | ||
| local rpath = path.getrelative(cfg.buildtarget.directory, fullpath) | ||
| rpath = p.quoted(rpath) -- quote in case of spaces in path |
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.
In "linker" mode, it is already surround (unconditionally) by '
0726f12 to
30bb617
Compare
samsinsane
left a comment
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.
Can you add some unit tests for this?
|
Is there any progress with this, @nickclark2016? Remember me from #2441 (better Conan support). If, for some reason, you declare a Premake project configuration with white spaces, e.g. configurations { "Debug", "Release", "Debug Sanitizers", "Release Sanitizers" }Compiling with the gmake generator, having a white space will force @utelle shared with me a working (but probably not universal) solution to handle this case: premake.override(premake.modules.gmake, "target", function(base, cfg, toolset)
local targetpath = string.gsub(premake.project.getrelative(cfg.project, cfg.buildtarget.directory), ' ', '_')
premake.outln('TARGETDIR = ' .. targetpath)
premake.outln('TARGET = $(TARGETDIR)/' .. cfg.buildtarget.name)
end)
premake.override(premake.modules.gmake, "objdir", function(base, cfg, toolset)
local objpath = string.gsub(premake.project.getrelative(cfg.project, cfg.objdir), ' ', '_')
premake.outln('OBJDIR = ' .. objpath)
end)Could you consider addressing this issue? |
|
Honestly, I'm extremely busy right now with work. The soonest I'll be able to get to new development on Premake is the new year. I'll happily review any PRs that get put out for this, but this one is probably dead. |
What does this PR do?
Resolves #2426 - Escapes run paths with spaces using quotes
How does this PR change Premake's behavior?
No breaking changes
Anything else we should know?
N/A
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!