diff options
| author | ruki <[email protected]> | 2019-01-31 00:33:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-30 21:21:39 +0800 |
| commit | bd0d65ae13eb3709dc43f364ed13166fb85edfbe (patch) | |
| tree | 1813eaf0036a1e537170d4e5b75126f8274f9c76 | |
| parent | 1514e110d328f14bbdde6b0f08b937b92e4e8261 (diff) | |
pass compiler settings for conan on windows
| -rw-r--r-- | xmake/modules/package/manager/conan/install_package.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/conan/install_package.lua b/xmake/modules/package/manager/conan/install_package.lua index 905c75078..06963ae00 100644 --- a/xmake/modules/package/manager/conan/install_package.lua +++ b/xmake/modules/package/manager/conan/install_package.lua @@ -121,12 +121,22 @@ function main(name, opt) end -- set build mode + table.insert(argv, "-s") if opt.mode == "debug" then - table.insert(argv, "-s") table.insert(argv, "build_type=Debug") + else + table.insert(argv, "build_type=Release") end - -- TODO pass compiler settings + -- set compiler settings + if opt.plat == "windows" then + local vsvers = {["2017"] = "15", ["2015"] = "14", ["2013"] = "12", ["2012"] = "11", ["2010"] = "10", ["2008"] = "9", ["2005"] = "8"} + local vs = assert(config.get("vs"), "vs not found!") + table.insert(argv, "-s") + table.insert(argv, "compiler=Visual Studio") + table.insert(argv, "-s") + table.insert(argv, "compiler.version=" .. assert(vsvers[vs], "unknown msvc version!")) + end -- set remote if opt.remote then |
