diff options
| author | ruki <[email protected]> | 2017-08-03 11:15:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-08-03 11:15:46 +0800 |
| commit | bcb21e7b854ee16baf2c0b992ded6b4e7cefb76c (patch) | |
| tree | f1276b9715ff5e363bfac14bd848f15c761e0367 /xmake/core/project/project.lua | |
| parent | b40bc697d9ce4e20836b60941daabfeaae080b28 (diff) | |
add cross platform and custom platform name
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index fb0999e60..6c844e4f0 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -84,7 +84,7 @@ function project._api_is_plat(interp, ...) -- exists this platform? and escape '-' for _, p in ipairs(table.join(...)) do - if p and type(p) == "string" and plat:find(p:gsub("%-", "%%-")) then + if p and type(p) == "string" and plat:find("^" .. p:gsub("%-", "%%-") .. "$") then return true end end @@ -99,7 +99,7 @@ function project._api_is_arch(interp, ...) -- exists this architecture? and escape '-' for _, a in ipairs(table.join(...)) do - if a and type(a) == "string" and arch:find(a:gsub("%-", "%%-")) then + if a and type(a) == "string" and arch:find("^" .. a:gsub("%-", "%%-") .. "$") then return true end end |
