diff options
| -rw-r--r-- | xmake/core/project/target.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index dae799f9e..f30807e7c 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1536,7 +1536,8 @@ function _instance:sourcefiles() pattern = pattern:sub(3) end pattern = path.pattern(pattern) - if sourcefile:match(pattern) then + -- we need match whole pattern, https://github.com/xmake-io/xmake/issues/3523 + if sourcefile:match("^" .. pattern .. "$") then return true end end |
