@@ -22,43 +22,37 @@ task("build")
2222 set_category (" main" )
2323 on_run (" main" )
2424 set_menu {
25- usage = " xmake [task] [options] [targets]"
26- , description = " Build targets if no given tasks."
27- , shortname = ' b'
28- , options =
29- {
30- {nil , " version" , " k" , nil , " Print the version number and exit." }
31- , {' b' , " build" , " k" , nil , " Build target. This is default building mode and optional." }
32- , {' r' , " rebuild" , " k" , nil , " Rebuild the target." }
33- , {' a' , " all" , " k" , nil , " Build all targets." }
34- , {nil , " shallow" , " k" , nil , " Only re-build the given targets without dependencies." }
35- , {' g' , " group" , " kv" , nil , " Build all targets of the given group. It support path pattern matching." ,
36- " e.g." ,
37- " xmake -g test" ,
38- " xmake -g test_*" ,
39- " xmake --group=benchmark/*" }
40- , {nil , " dry-run" , " k" , nil , " Dry run to build target." }
41-
42- , {}
43- , {' j' , " jobs" , " kv" , tostring (os.default_njob ()),
44- " Set the number of parallel compilation jobs." }
45- , {nil , " linkjobs" , " kv" , nil , " Set the number of parallel link jobs." }
46- , {' w' , " warning" , " k" , false , " Enable the warnings output. (deprecated)" }
47- , {nil , " linkonly" , " k" , false , " Only link targets if object files have been compiled." }
48- , {nil , " files" , " kv" , nil , " Build the given source files." ,
49- " e.g. " ,
50- " - xmake --files=src/main.c" ,
51- " - xmake --files='src/*.c' [target]" ,
52- " - xmake --files='src/**.c|excluded_file.c'" ,
53- " - xmake --files='src/main.c" .. path.envsep () .. " src/test.c'" }
54-
55- , {}
56- , {nil , " targets" , " vs" , nil , " The target names. It will build all default targets if this parameter is not specified." ,
57- " e.g." ,
58- " xmake build target1 target2 ..."
59- , values = function (complete , opt ) return import (" private.utils.complete_helper.targets" )(complete , opt ) end }
60- }
61- }
62-
63-
64-
25+ usage = " xmake [task] [options] [targets]" ,
26+ description = " Build targets if no given tasks." ,
27+ shortname = ' b' ,
28+ options = {
29+ {nil , " version" , " k" , nil , " Print the version number and exit." },
30+ {' b' , " build" , " k" , nil , " Build target. This is default building mode and optional." },
31+ {' r' , " rebuild" , " k" , nil , " Rebuild the target." },
32+ {' a' , " all" , " k" , nil , " Build all targets." },
33+ {nil , " shallow" , " k" , nil , " Only re-build the given targets without dependencies." },
34+ {' g' , " group" , " kv" , nil , " Build all targets of the given group. It support path pattern matching." ,
35+ " e.g." ,
36+ " xmake -g test" ,
37+ " xmake -g test_*" ,
38+ " xmake --group=benchmark/*" },
39+ {nil , " dry-run" , " k" , nil , " Dry run to build target." },
40+ {},
41+ {' j' , " jobs" , " kv" , tostring (os.default_njob ()),
42+ " Set the number of parallel compilation jobs." },
43+ {nil , " linkjobs" , " kv" , nil , " Set the number of parallel link jobs." },
44+ {' w' , " warning" , " k" , false , " Enable the warnings output. (deprecated)" },
45+ {nil , " linkonly" , " k" , false , " Only link targets if object files have been compiled." },
46+ {nil , " files" , " kv" , nil , " Build the given source files." ,
47+ " e.g. " ,
48+ " - xmake --files=src/main.c" ,
49+ " - xmake --files='src/*.c' [target]" ,
50+ " - xmake --files='src/**.c|excluded_file.c'" ,
51+ " - xmake --files='src/main.c" .. path.envsep () .. " src/test.c'" },
52+ {},
53+ {nil , " targets" , " vs" , nil , " The target names. It will build all default targets if this parameter is not specified." ,
54+ " e.g." ,
55+ " xmake build target1 target2 ..." ,
56+ values = function (complete , opt ) return import (" private.utils.complete_helper.targets" )(complete , opt ) end },
57+ }
58+ }
0 commit comments