summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/manager/conan/v2/install_package.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/xmake/modules/package/manager/conan/v2/install_package.lua b/xmake/modules/package/manager/conan/v2/install_package.lua
index 111b355d7..5d2bdd384 100644
--- a/xmake/modules/package/manager/conan/v2/install_package.lua
+++ b/xmake/modules/package/manager/conan/v2/install_package.lua
@@ -226,14 +226,15 @@ function _conan_generate_compiler_profile(profile, configs, opt)
else
local program, toolname = platform.tool("cc", plat, arch)
if toolname == "gcc" or toolname == "clang" then
- runtimes = table.wrap(runtimes)
profile:print("compiler=" .. toolname)
profile:print("compiler.cppstd=gnu17")
- if table.contains(runtimes, "c++_static", "c++_shared") then
- profile:print("compiler.libcxx=libc++")
- else
- profile:print("compiler.libcxx=libstdc++11")
+ local libcxx = "libstdc++11"
+ if runtimes and table.contains(table.wrap(runtimes), "c++_static", "c++_shared") then
+ libcxx = "libc++"
+ elseif not runtimes and toolname == "clang" then
+ libcxx = "libc++"
end
+ profile:print("compiler.libcxx=" .. libcxx)
local version = _conan_get_compiler_version(toolname, program)
if version then
profile:print("compiler.version=" .. version)