Skip to content
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

Fix #1411: Remove "|" from Codelite config names #1419

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/codelite/codelite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
-- Modified by: Andrea Zanellato
-- Andrew Gough
-- Manu Evans
-- Jason Perkins
-- Created: 2013/05/06
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
-- Copyright: (c) 2008-2020 Jason Perkins and the Premake project
--

local p = premake
Expand All @@ -21,7 +22,8 @@
function codelite.cfgname(cfg)
local cfgname = cfg.buildcfg
if codelite.workspace.multiplePlatforms then
cfgname = string.format("%s|%s", cfg.platform, cfg.buildcfg)
-- Codelite breaks if "|" is used here, see #1411
cfgname = string.format("%s-%s", cfg.platform, cfg.buildcfg)
end
return cfgname
end
Expand Down
31 changes: 31 additions & 0 deletions modules/codelite/tests/test_codelite_workspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,34 @@
</CodeLite_Workspace>
]])
end

---
-- Test handling of platforms
---

function suite.onPlatforms()
workspace "MyWorkspace"
platforms { "x86_64", "x86" }

prepare()
test.capture [[
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
<Project Name="MyProject" Path="MyProject.project"/>
<BuildMatrix>
<WorkspaceConfiguration Name="x86_64-Debug" Selected="yes">
<Project Name="MyProject" ConfigName="x86_64-Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="x86-Debug" Selected="yes">
<Project Name="MyProject" ConfigName="x86-Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="x86_64-Release" Selected="yes">
<Project Name="MyProject" ConfigName="x86_64-Release"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="x86-Release" Selected="yes">
<Project Name="MyProject" ConfigName="x86-Release"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>
]]
end