-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Improve rule() api and add some builtin rules #167
Labels
Milestone
Comments
xmake will provide some builtin rules in -- define rule: debug mode
rule("mode.debug")
on_load(function (target)
-- is debug mode now? xmake f -m debug
if is_mode("debug") then
-- enable the debug symbols
target:set("symbols", "debug")
-- disable optimization
target:set("optimize", "none")
end
end) |
This was referenced Apr 14, 2018
Some rule apis:
All rules are superimposed on the specified target. |
We will provide some qt rules #160 to implement it, for example: target("qt_test1")
add_rules("qt.console")
add_files("src/*.cpp") target("qt_test2")
add_rules("qt.application")
add_files("src/*.cpp") |
Support multi-rules in same files. rule("rule1")
before_build_file(function (target, sourcefile)
end)
rule("rule2")
after_build_file(function (target, sourcefile)
end)
target("console_c")
set_kind("binary")
add_files("src/*.c", {rules = {"rule1", "rule2"}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in version(2.2.1):
Before:
The text was updated successfully, but these errors were encountered: