diff options
| author | ruki <[email protected]> | 2020-12-18 21:01:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-18 21:01:27 +0800 |
| commit | 37d4120c6cfd0454b45d606d2969e41631cc1f42 (patch) | |
| tree | d969b5489ef6552358144e562a5bf569d5754559 | |
| parent | 4560dba670ee153a00f6d7c1cdf65b7c7232ac4d (diff) | |
improve to generate vs201x
| -rw-r--r-- | xmake/actions/config/main.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 6c143bf81..322048f4a 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -302,7 +302,7 @@ force to build in current directory via run `xmake -P .`]], os.projectdir()) -- only config for building project using third-party buildsystem if not trybuild then - -- install and update requires and config header + -- install and update requires local require_enable = option.boolean(option.get("require")) if (recheck or require_enable) and require_enable ~= false then install_requires() @@ -312,7 +312,7 @@ force to build in current directory via run `xmake -P .`]], os.projectdir()) -- otherwise has_package() will be invalid. _check_target(targetname) - -- update the config header + -- update the config files if recheck then generate_configfiles() generate_configheader() diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 10784c5ea..e17825535 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -29,6 +29,9 @@ import("core.tool.toolchain") import("vs201x_solution") import("vs201x_vcxproj") import("vs201x_vcxproj_filters") +import("lib.detect.cache", {alias = "detectcache"}) +import("actions.require.install", {alias = "install_requires", rootdir = os.programdir()}) +import("actions.config.configfiles", {alias = "generate_configfiles", rootdir = os.programdir()}) import("actions.config.configheader", {alias = "generate_configheader", rootdir = os.programdir()}) -- make target info @@ -229,6 +232,9 @@ function make(outputdir, vsinfo) -- reload config, project and platform if mode ~= config.mode() or arch ~= config.arch() then + -- clear detect cache + detectcache.clear() + -- modify config config.set("as", nil, {force = true}) -- force to re-check as for ml/ml64 config.set("mode", mode, {readonly = true, force = true}) @@ -243,7 +249,11 @@ function make(outputdir, vsinfo) -- check project options project.check() - -- re-generate configheader + -- install and update requires + install_requires() + + -- update config files + generate_configfiles() generate_configheader() end |
