premake / premake/premake-core
Looking for an example of using a `configmap` to map a build configuration/platform pair
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 654
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Description
What are you trying to do?
"Map Build Configuration and Platform pairs using a configmap."
From https://premake.github.io/docs/configmap/
wks_cfg is the workspace configuration being mapped. It can be a string representing a build configuration or a platform, or a table holding a build configuration/platform pair.
prj_cfg is the project configuration to which the workspace configuration should be mapped. It may also be a string or a build configuration/platform pair.
What problem are you having?
I have tried syntax like this:
configmap {
[{ 'Debug', 'x64' }] = { 'Debug', 'Any CPU' },
[{ 'Internal', 'x64' }] = { 'Release', 'Any CPU' }
}
premake doesn't error, but the output sln file seems to have ignored it:
{0AACB1DA-1E49-4034-A852-4F6D6B1BF838}.Debug|x64.ActiveCfg = Debug|x64
{0AACB1DA-1E49-4034-A852-4F6D6B1BF838}.Debug|x64.Build.0 = Debug|x64
{0AACB1DA-1E49-4034-A852-4F6D6B1BF838}.Internal|x64.ActiveCfg = Internal|x64
{0AACB1DA-1E49-4034-A852-4F6D6B1BF838}.Internal|x64.Build.0 = Internal|x64
What have you tried so far?
I have also tried a simpler configmap to see if I could just map the Platform:
configmap { [ "x64" ] = "Any CPU" }
again, with no mapping occurring.
This mapping of just the Build Configuration works:
configmap {
[ 'Internal' ] = 'Release'
}
What version of Premake are you using?
Premake 5.0.71 (72b58235), a build script generator.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configmap documentation and reproduce the supplied Lua mappings using Premake 5.0.71. Compare the generated solution configuration lines with the requested Debug/x64, Internal/x64, and Any CPU mappings; done means the mapping works as documented or the expected syntax and limitation are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100