diff options
| author | ruki <[email protected]> | 2024-01-24 00:46:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-01-25 12:09:59 +0800 |
| commit | 7c0fcf37dae8da15fe47f5ae8c35bcfa07570e0a (patch) | |
| tree | 0f5d552ec37b8e1860110ace197fa39672794075 | |
| parent | a7a9aeb01e456651600b1fb8cb2b7e590036d3db (diff) | |
improve conan runtimes again
| -rw-r--r-- | xmake/modules/package/manager/conan/v2/install_package.lua | 11 |
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) |
