summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-14 00:55:46 +0800
committerruki <[email protected]>2018-04-13 23:34:39 +0800
commita8a05178346e5efb902aaef8c55264e130389e00 (patch)
treedac9887f08aee7fb5b86bf0b001debf422cf2f24
parent7467328ac81ac59a95125420b4dbca1bc3abc5f3 (diff)
improve some templates
-rw-r--r--tests/projects/console_c/xmake.lua2
-rw-r--r--tests/projects/qt_console/xmake.lua2
-rw-r--r--xmake/templates/c++/console/project/xmake.lua23
-rw-r--r--xmake/templates/c++/shared_library/project/xmake.lua23
-rw-r--r--xmake/templates/c++/static_library/project/xmake.lua23
-rw-r--r--xmake/templates/c/console/project/xmake.lua23
-rw-r--r--xmake/templates/c/shared_library/project/xmake.lua23
-rw-r--r--xmake/templates/c/static_library/project/xmake.lua23
-rw-r--r--xmake/templates/dlang/console/project/xmake.lua23
-rw-r--r--xmake/templates/go/console/project/xmake.lua23
-rw-r--r--xmake/templates/objc/console/project/xmake.lua23
-rw-r--r--xmake/templates/rust/console/project/xmake.lua23
-rw-r--r--xmake/templates/swift/console/project/xmake.lua23
13 files changed, 24 insertions, 233 deletions
diff --git a/tests/projects/console_c/xmake.lua b/tests/projects/console_c/xmake.lua
index 05d54fa63..4faa18a0f 100644
--- a/tests/projects/console_c/xmake.lua
+++ b/tests/projects/console_c/xmake.lua
@@ -1,5 +1,5 @@
--- add debug/release mode
+-- add modes: debug and release
add_rules("mode:debug", "mode:release")
-- add target
diff --git a/tests/projects/qt_console/xmake.lua b/tests/projects/qt_console/xmake.lua
index 81ce32842..0ab7a6b23 100644
--- a/tests/projects/qt_console/xmake.lua
+++ b/tests/projects/qt_console/xmake.lua
@@ -1,5 +1,5 @@
--- add debug/release mode
+-- add modes: debug and release
add_rules("mode:debug", "mode:release")
-- add target
diff --git a/xmake/templates/c++/console/project/xmake.lua b/xmake/templates/c++/console/project/xmake.lua
index bc427742c..5cd29b202 100644
--- a/xmake/templates/c++/console/project/xmake.lua
+++ b/xmake/templates/c++/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/c++/shared_library/project/xmake.lua b/xmake/templates/c++/shared_library/project/xmake.lua
index e501547f7..b6166c371 100644
--- a/xmake/templates/c++/shared_library/project/xmake.lua
+++ b/xmake/templates/c++/shared_library/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/c++/static_library/project/xmake.lua b/xmake/templates/c++/static_library/project/xmake.lua
index 84c9a207b..59ca2ece3 100644
--- a/xmake/templates/c++/static_library/project/xmake.lua
+++ b/xmake/templates/c++/static_library/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/c/console/project/xmake.lua b/xmake/templates/c/console/project/xmake.lua
index d29179e0f..6bac72937 100644
--- a/xmake/templates/c/console/project/xmake.lua
+++ b/xmake/templates/c/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/c/shared_library/project/xmake.lua b/xmake/templates/c/shared_library/project/xmake.lua
index b1cc77fc8..3ea94ef68 100644
--- a/xmake/templates/c/shared_library/project/xmake.lua
+++ b/xmake/templates/c/shared_library/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/c/static_library/project/xmake.lua b/xmake/templates/c/static_library/project/xmake.lua
index c48e22fd7..f80117e8b 100644
--- a/xmake/templates/c/static_library/project/xmake.lua
+++ b/xmake/templates/c/static_library/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/dlang/console/project/xmake.lua b/xmake/templates/dlang/console/project/xmake.lua
index 8eaecc262..d7c3ba02e 100644
--- a/xmake/templates/dlang/console/project/xmake.lua
+++ b/xmake/templates/dlang/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/go/console/project/xmake.lua b/xmake/templates/go/console/project/xmake.lua
index bf7f3e04b..4b5d87a02 100644
--- a/xmake/templates/go/console/project/xmake.lua
+++ b/xmake/templates/go/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/objc/console/project/xmake.lua b/xmake/templates/objc/console/project/xmake.lua
index e7724adb5..9b2fb3343 100644
--- a/xmake/templates/objc/console/project/xmake.lua
+++ b/xmake/templates/objc/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add frameworks
add_frameworks("Foundation", "CoreFoundation")
diff --git a/xmake/templates/rust/console/project/xmake.lua b/xmake/templates/rust/console/project/xmake.lua
index 0e4bd709d..889e23c94 100644
--- a/xmake/templates/rust/console/project/xmake.lua
+++ b/xmake/templates/rust/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")
diff --git a/xmake/templates/swift/console/project/xmake.lua b/xmake/templates/swift/console/project/xmake.lua
index 45fe404a0..2566b5149 100644
--- a/xmake/templates/swift/console/project/xmake.lua
+++ b/xmake/templates/swift/console/project/xmake.lua
@@ -1,25 +1,6 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
+-- add modes: debug and release
+add_rules("mode:debug", "mode:release")
-- add target
target("[targetname]")