diff options
| author | ruki <[email protected]> | 2022-08-16 12:33:47 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-16 12:33:47 +0800 |
| commit | 81aca6fbe9149b377cdd88e8ee4b8f045d5a46da (patch) | |
| tree | 0f138f960ab9fd95265ecbffca7c6ae27d65f4a3 /xmake/modules/detect | |
| parent | d46b16f8c40493bfc78764931bf7c3209442696b (diff) | |
| parent | d9f82e1bba29adc8b11dc1f7b3887717f03137d6 (diff) | |
Merge pull request #2641 from xmake-io/cxxmodules
Improve C++20 modules support
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/tools/cl/has_flags.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/gcc/has_flags.lua | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/cl/has_flags.lua b/xmake/modules/detect/tools/cl/has_flags.lua index ceb3561d4..fe57e38b0 100644 --- a/xmake/modules/detect/tools/cl/has_flags.lua +++ b/xmake/modules/detect/tools/cl/has_flags.lua @@ -83,7 +83,8 @@ end function main(flags, opt) -- attempt to check it from the argument list - if _check_from_arglist(flags, opt) then + opt = opt or {} + if not opt.tryrun and _check_from_arglist(flags, opt) then return true end diff --git a/xmake/modules/detect/tools/gcc/has_flags.lua b/xmake/modules/detect/tools/gcc/has_flags.lua index f7cf1d29e..b8e63423a 100644 --- a/xmake/modules/detect/tools/gcc/has_flags.lua +++ b/xmake/modules/detect/tools/gcc/has_flags.lua @@ -101,10 +101,11 @@ end function main(flags, opt) -- is linker? + opt = opt or {} local islinker = _islinker(flags, opt) -- attempt to check it from the argument list - if _check_from_arglist(flags, opt, islinker) then + if not opt.tryrun and _check_from_arglist(flags, opt, islinker) then return true end |
