Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update option_instance.md #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions zh-cn/manual/option_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ option:add("links", "sdl2")
option:add("defines", "SDL_MAIN_HANDLED")
```

#### get_config

- 值得注意的是,在脚本域中同样可以直接使用`get_config`来获取target的选项值

```lua
target("test")
set_kind("phony")
add_options("exp")
on_build(function (target)
print("$(exp)")
print(get_config("exp"))
end)
```

!> 此处文档还在进行中,请耐心等待,你也可以通过赞助或者提 pr 来加速文档的更新