diff options
| author | ruki <[email protected]> | 2022-10-17 23:14:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-17 23:14:36 +0800 |
| commit | 860b2c9d4100bd69927aa9e099e07e7c0bdd9638 (patch) | |
| tree | a6f539c04f1163e31841c3d7324fe4f577c4689f | |
| parent | 6b8dbdb0b8a0dd5f1fa379e9d4a91a0e72c15246 (diff) | |
pass project policy to target
| -rw-r--r-- | xmake/core/project/target.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index f20d0e3f7..af78ee398 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -643,7 +643,14 @@ function _instance:policy(name) end end end - return policy.check(name, policies and policies[name]) + local value + if policies then + value = policies[name] + end + if value == nil and target._project() then + value = target._project().policy(name) + end + return policy.check(name, value) end -- get the base name of target file |
