summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-07-23 22:37:56 +0800
committerruki <[email protected]>2018-07-23 09:47:41 +0800
commita11164313e86c63b8681dda7fdd34a0c58f43d6c (patch)
treed2632ca343fab5dbced42c93333738511ef28da6
parent1960eb1245f321be9c471cbe2b2a4700cb3531c1 (diff)
add debug/release rules to auto-generated xmake.lua
-rw-r--r--CHANGELOG.md2
-rw-r--r--xmake/actions/config/scanner.lua5
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f1e81a29..6c1a51bcb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
### Changes
* Improve to detect Qt envirnoment and support mingw
+* Add debug and release rules to the auto-generated xmake.lua
## v2.2.1
@@ -472,6 +473,7 @@
### 改进
* 改进Qt编译编译环境探测,增加对mingw sdk的支持
+* 在自动扫描生成的xmake.lua中增加默认debug/release规则
## v2.2.1
diff --git a/xmake/actions/config/scanner.lua b/xmake/actions/config/scanner.lua
index a9eb87a9e..52841feb1 100644
--- a/xmake/actions/config/scanner.lua
+++ b/xmake/actions/config/scanner.lua
@@ -97,6 +97,11 @@ function make()
-- trace
cprint("target(${magenta}%s${clear}): %s", targetname, targetkind)
+ -- add rules
+ file:print("-- add rules: debug/release")
+ file:print("add_rules(\"mode.debug\", \"mode.release\")")
+ file:print("")
+
-- add target
file:print("-- define target")
file:print("target(\"%s\")", targetname)