diff options
| author | ruki <[email protected]> | 2022-02-10 23:36:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-02-10 23:36:28 +0800 |
| commit | 516025ffbb52b7a81d144026db20f3f0d281b65f (patch) | |
| tree | 9781ec94c8243c4ac7a0bbcd7ba0ce12ff4855ce /xmake/plugins | |
| parent | 6bcf1e968c61b8994a02d18929ba14b984ed47e1 (diff) | |
improve vs generator
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 622b949bf..2595b19e0 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -89,10 +89,8 @@ function _make_dirs(dir, vcxprojdir) return path.joinenv(r) end --- clear cache configuration -function _clear_cacheconf() - config.clear() - config.save() +-- clear cache +function _clear_cache() localcache.clear("config") localcache.clear("detect") localcache.clear("option") @@ -501,6 +499,7 @@ function make(outputdir, vsinfo) -- load targets local targets = {} + local configdata = io.readfile(config.filepath()) for mode_idx, mode in ipairs(vsinfo.modes) do for arch_idx, arch in ipairs(vsinfo.archs) do @@ -590,8 +589,13 @@ function make(outputdir, vsinfo) vs201x_vcxproj_filters.make(vsinfo, target) end - -- clear config and local cache - _clear_cacheconf() + -- clear local cache + _clear_cache() + + -- restore previous config data + if configdata then + io.writefile(config.filepath(), configdata) + end -- leave project directory os.cd(oldir) |
