diff options
| author | ruki <[email protected]> | 2017-07-17 23:24:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-17 23:24:34 +0800 |
| commit | 7cac00bb9cace801c6db9758d2a01d2711738926 (patch) | |
| tree | 40831686913090534c1e2b5ddb54399aa5b6bf11 /xmake/modules/lib/detect/features.lua | |
| parent | 33144e73eae59ee7d934fd77673aac5a5a5cb0d1 (diff) | |
add add_moduledirs api and improve import
Diffstat (limited to 'xmake/modules/lib/detect/features.lua')
| -rw-r--r-- | xmake/modules/lib/detect/features.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xmake/modules/lib/detect/features.lua b/xmake/modules/lib/detect/features.lua index be1974a20..3992e52d5 100644 --- a/xmake/modules/lib/detect/features.lua +++ b/xmake/modules/lib/detect/features.lua @@ -76,11 +76,9 @@ function main(name, opt) -- detect.tools.xxx.features(opt)? _g._checking = ifelse(coroutine_running, key, nil) - if os.isfile(path.join(os.programdir(), "modules", "detect", "tools", tool.name, "features.lua")) then - local features = import("detect.tools." .. tool.name .. ".features") - if features then - result = features(opt) - end + local features = import("detect.tools." .. tool.name .. ".features", {try = true}) + if features then + result = features(opt) end _g._checking = nil |
