diff options
| author | ruki <[email protected]> | 2023-03-19 23:44:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-19 23:44:35 +0800 |
| commit | 8f80d4f01d31bf3a873e7b5797d3ed97c569f23e (patch) | |
| tree | bb07538f96a645b0f50dfa0ddbe3f0649463fa0e /xmake | |
| parent | 3bffb973b717facc6fe7c0728a8993ff03ce9c87 (diff) | |
improve to check main
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/modules/lib/detect/check_cxsnippets.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 922b7eac6..32de0bee4 100644 --- a/xmake/modules/lib/detect/check_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -79,7 +79,7 @@ function _sourcecode(snippets, opt) local has_main = false for _, snippet in pairs(snippets) do -- find int main(int argc, char** argv) {} - if snippet:find("%s+main%s*%(.-%)") then + if snippet:find("int%s+main%s*%(.-%)%s*{") then has_main = true break end |
