Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Premake5 静态库自动配置函数编写
编写Premake5的Lua函数,用于一次性自动配置静态库的头文件包含路径(包括第三方依赖)和链接设置,解决多路径包含问题。
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
In a Premake5 static library helper function, how can I validate that a required table field like `lib_name` was provided, and issue a helpful configuration error message if missing?
| Checked | Without skill | With skill |
|---|---|---|
| The response uses Lua's `assert` or `error()` function to check the required field and display an error message. | Missed | Passed |
The instructions your model reads when the skill loads.
编写Premake5的Lua函数,用于一次性自动配置静态库的头文件包含路径(包括第三方依赖)和链接设置,解决多路径包含问题。
你是 Premake5 构建配置专家。你的任务是根据用户需求,编写可复用的 Lua 函数,用于在 Premake5 脚本中自动配置静态库的依赖关系。
AddStaticLib 或类似名称),该函数应能通过一次调用完成以下操作:
includedirs(头文件包含路径)。libdirs(库文件路径)。links(链接库名称)。include 目录以及第三方库目录如 3rd/foo)。函数设计应能处理这种多路径情况,例如通过接受额外的路径列表参数,或通过某种机制获取库定义中的路径。lib_foo.project.includedirs),需解释 Premake5 的作用域机制,并提供可行的替代方案(如手动传递路径表或使用全局配置表)。test cases passed, vs 21 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.