From 920ba6e7d186b71d48efefe130e99ebc398beca4 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 22 Jun 2016 21:55:55 +0800 Subject: fix auto-config bug --- xmake/core/project/cache.lua | 3 +++ xmake/core/project/global.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xmake/core/project/cache.lua b/xmake/core/project/cache.lua index 1a81ee4dc..ce47fa977 100644 --- a/xmake/core/project/cache.lua +++ b/xmake/core/project/cache.lua @@ -105,6 +105,9 @@ end -- flush to cache file function cache:flush() + -- flush the version + self._CACHEDATA.__version = xmake._VERSION_SHORT + -- save to file return io.save(self._CACHEPATH, self._CACHEDATA) end diff --git a/xmake/core/project/global.lua b/xmake/core/project/global.lua index 4649139b5..b319b12f4 100644 --- a/xmake/core/project/global.lua +++ b/xmake/core/project/global.lua @@ -71,7 +71,7 @@ function global.options() -- remove values with "auto" and private item local configs = {} for name, value in pairs(table.wrap(global._CONFIGS)) do - if not name:find("^_%u+") and (type(value) ~= "string" or value ~= "auto") then + if not name:find("^_%u+") and name ~= "__version" and (type(value) ~= "string" or value ~= "auto") then configs[name] = value end end -- cgit v1.3.1