diff options
| -rw-r--r-- | xmake/modules/detect/tools/find_mold.lua | 1 | ||||
| -rw-r--r-- | xmake/rules/qt/load.lua | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/xmake/modules/detect/tools/find_mold.lua b/xmake/modules/detect/tools/find_mold.lua index bcba774c3..5c6f32ffb 100644 --- a/xmake/modules/detect/tools/find_mold.lua +++ b/xmake/modules/detect/tools/find_mold.lua @@ -21,6 +21,7 @@ -- imports import("core.tool.compiler") import("lib.detect.find_program") +import("lib.detect.find_programver") -- find ar -- diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index 6544d2409..1ae5c67c6 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -143,6 +143,13 @@ function main(target, opt) target:add("asflags", "-fPIC") end + if qt_sdkver:ge("6.0") then + -- @see https://github.com/xmake-io/xmake/issues/2071 + if target:is_plat("windows") then + target:add("cxxflags", "/Zc:__cplusplus") + target:add("cxxflags", "/permissive-") + end + end -- need c++11 at least local languages = target:get("languages") local cxxlang = false @@ -162,11 +169,6 @@ function main(target, opt) if (not cppversion) or (tonumber(cppversion) and tonumber(cppversion) < 17) then target:add("languages", "c++17") end - -- @see https://github.com/xmake-io/xmake/issues/2071 - if target:is_plat("windows") then - target:add("cxxflags", "/Zc:__cplusplus") - target:add("cxxflags", "/permissive-") - end else -- add conditionnaly c++11 to avoid for example "cl : Command line warning D9025 : overriding '/std:c++latest' with '/std:c++11'" warning if (not cppversion) or (tonumber(cppversion) and tonumber(cppversion) < 11) then |
