premake / premake/premake-core
"filter:" + absolute path dosn't work.
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 654
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Description
Hi.
I wrote premake.lua like this.
filter {"files:C:/path/to/library/**.cpp"}
flags { "NoPCH" }
"C:/path/to/library/" is acquired via environment variable, so it can't be relative path.
But this couses error.
Invalid field prefix 'c'
How to fix it?
Thanks
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 filter expression shown in premake.lua and reproduce the failure using the absolute path from the environment variable. Trace how the filter parses the path and its field prefix, then verify that the NoPCH flag applies to the intended .cpp files without the “Invalid field prefix” error.
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
- 35/100