aboutsummaryrefslogtreecommitdiff
path: root/manual.md
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-08-11 00:46:01 +0800
committerruki <waruqi@gmail.com>2018-08-10 22:36:08 +0800
commit96e0ba81e20fa68d973ac84c01ead139118c072a (patch)
tree5477b05cca91dc1170603fbe2f70749a2681e392 /manual.md
parent985a057cfd771c45d49727b15507f1a6ffbb451f (diff)
downloadxmake-docs-96e0ba81e20fa68d973ac84c01ead139118c072a.tar.gz
xmake-docs-96e0ba81e20fa68d973ac84c01ead139118c072a.zip
modify title orders
Diffstat (limited to 'manual.md')
-rw-r--r--manual.md72
1 files changed, 36 insertions, 36 deletions
diff --git a/manual.md b/manual.md
index 17cda852..cb0f9e5c 100644
--- a/manual.md
+++ b/manual.md
@@ -240,6 +240,42 @@ if is_option("demo") then
end
```
+##### is_config
+
+###### Is the given config values?
+
+This interface is introduced from version 2.2.2 to determine whether the specified configuration is a given value.
+
+For example:
+
+```console
+$ xmake f --test=hello1
+```
+
+```lua
+option("test")
+ set_showmenu("true")
+ set_description("The test config option")
+option_end()
+
+if is_config("test", "hello1", "hello2") then
+ add_defines("HELLO")
+end
+```
+
+Not only that, we can also set pattern matching rules to determine values, such as:
+
+```lua
+if is_config("test", "hello.*") then
+ add_defines("HELLO")
+end
+```
+
+<p class="tips">
+This interface is not only able to determine the custom options defined through the [option](#option),
+but also to determine the built-in global and local configuration.
+</p>
+
##### has_config
###### Is the given configs enabled?
@@ -278,42 +314,6 @@ This interface can determine not only the built-in global and local configs,
but also the custom options defined through the [option](#option).
</p>
-##### is_config
-
-###### Is the given config values?
-
-This interface is introduced from version 2.2.2 to determine whether the specified configuration is a given value.
-
-For example:
-
-```console
-$ xmake f --test=hello1
-```
-
-```lua
-option("test")
- set_showmenu("true")
- set_description("The test config option")
-option_end()
-
-if is_config("test", "hello1", "hello2") then
- add_defines("HELLO")
-end
-```
-
-Not only that, we can also set pattern matching rules to determine values, such as:
-
-```lua
-if is_config("test", "hello.*") then
- add_defines("HELLO")
-end
-```
-
-<p class="tips">
-This interface is not only able to determine the custom options defined through the [option](#option),
-but also to determine the built-in global and local configuration.
-</p>
-
#### Global Interfaces
The global interface affects the whole project description scope and all sub-project files.