summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-07-22 23:42:47 +0800
committerGitHub <[email protected]>2023-07-22 23:42:47 +0800
commit22cd7c1f77d5db69e474026e195388fd52f8a84d (patch)
treee06b03fdda0faab31dc31863d43ec3fb4b9dae01
parent85c280aa5b3d9614f5f3c2ee54d930cc66f15ea5 (diff)
parentfb87d9b6f84b175f8e3c73485ab04d5b78b0e646 (diff)
Merge pull request #3991 from tgsong/master
Set cppstd for msvc in conan 2.0
-rw-r--r--xmake/modules/package/manager/conan/v2/install_package.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/conan/v2/install_package.lua b/xmake/modules/package/manager/conan/v2/install_package.lua
index b58d28365..516f43eaa 100644
--- a/xmake/modules/package/manager/conan/v2/install_package.lua
+++ b/xmake/modules/package/manager/conan/v2/install_package.lua
@@ -178,6 +178,10 @@ function _conan_generate_compiler_profile(profile, configs, opt)
local vs = assert(config.get("vs"), "vs not found!")
profile:print("compiler=msvc")
profile:print("compiler.version=" .. assert(vsvers[vs], "unknown msvc version!"))
+ -- @see https://github.com/conan-io/conan/issues/12387
+ if vs >= 2015 then
+ profile:print("compiler.cppstd=14")
+ end
local vs_runtime = configs.vs_runtime
if vs_runtime then
profile:print("compiler.runtime=" .. (vs_runtime:startswith("MD") and "dynamic" or "static"))