diff options
| author | ruki <[email protected]> | 2017-07-19 09:51:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-19 09:51:48 +0800 |
| commit | 75ddc718c55c578c53f22ac925bc1b9df4cf7ded (patch) | |
| tree | 09941c4d8db0fa42450b052edb01310e9431f5a4 | |
| parent | 93ec0e112c5ccb4a2acd1ba5a36320218cd73c7e (diff) | |
continue to fix option checking
| -rw-r--r-- | xmake/core/project/option.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 748ef03e5..0400fd1d3 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -84,6 +84,7 @@ function option:_cx_check() self._check_cxsnippets = self._check_cxsnippets or import("lib.detect.check_cxsnippets") -- check for c and c++ + local checked = false for _, kind in ipairs({"c", "cxx"}) do -- get conditions @@ -108,15 +109,21 @@ function option:_cx_check() return false, results_or_errors end + -- mark as checked + checked = true + -- passed? if results_or_errors then self:enable(true) + break end - else - -- no checked conditions, passed directly - self:enable(true) end end + + -- no checked conditions, passed directly + if not checked then + self:enable(true) + end -- ok return true |
