summaryrefslogtreecommitdiff
path: root/xmake/rules/qt/load.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-04-16 22:32:03 +0800
committerruki <[email protected]>2019-04-16 09:12:22 +0800
commitad7e4fce0945c59cc2a5ed63b1db2085472bcfa3 (patch)
tree082147cff049be2f457836ed8da7069b08db72ed /xmake/rules/qt/load.lua
parent935f788ee50dcb8c87a38360a56b51e54b75ce7b (diff)
fix set cxx17 bug for qt rules
Diffstat (limited to 'xmake/rules/qt/load.lua')
-rw-r--r--xmake/rules/qt/load.lua14
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