diff options
| author | ruki <[email protected]> | 2019-04-16 22:32:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-04-16 09:12:22 +0800 |
| commit | ad7e4fce0945c59cc2a5ed63b1db2085472bcfa3 (patch) | |
| tree | 082147cff049be2f457836ed8da7069b08db72ed /xmake/rules/qt/load.lua | |
| parent | 935f788ee50dcb8c87a38360a56b51e54b75ce7b (diff) | |
fix set cxx17 bug for qt rules
Diffstat (limited to 'xmake/rules/qt/load.lua')
| -rw-r--r-- | xmake/rules/qt/load.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index 638d61e56..e449a7c69 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -71,8 +71,18 @@ function main(target, opt) target:add("mxflags", "-fPIC") target:add("asflags", "-fPIC") - -- need c++11 - target:set("languages", "cxx11") + -- need c++11 at least + local languages = target:get("languages") + local cxxlang = false + for _, lang in ipairs(languages) do + if lang:startswith("cxx") or lang:startswith("c++") then + cxxlang = true + break + end + end + if not cxxlang then + target:add("languages", "cxx11") + end -- add defines for the compile mode if is_mode("debug") then |
