summaryrefslogtreecommitdiff
path: root/xmake/actions/config/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-06 09:12:08 +0800
committerruki <[email protected]>2016-07-06 09:12:08 +0800
commitd24fcddbc2f1093f3943a917d99c5a8989ef2644 (patch)
tree0cfc7af6e4a318148ed4ba4c13884f3b0e9d7f21 /xmake/actions/config/main.lua
parent33d020825c90d656d1d1a504039e7d9781784e8b (diff)
fix configure error after host changedv2.0.2
Diffstat (limited to 'xmake/actions/config/main.lua')
-rwxr-xr-xxmake/actions/config/main.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index 9b7790f0c..8b46f58a1 100755
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -34,6 +34,11 @@ function _option_filter(name)
return name and name ~= "target" and name ~= "file" and name ~= "project" and name ~= "verbose"
end
+-- host changed?
+function _host_changed(targetname)
+ return os.host() ~= config.read("host", targetname)
+end
+
-- need check
function _need_check()
@@ -194,7 +199,7 @@ function main()
end
-- merge the cached configure
- if not option.get("clean") then
+ if not option.get("clean") and not _host_changed(targetname) then
config.load(targetname)
end