forked from hwaf/hwaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmd_asetup.go
49 lines (44 loc) · 1.57 KB
/
cmd_asetup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
import (
"github.com/gonuts/commander"
"github.com/gonuts/flag"
"github.com/hwaf/hwaf/plugins/asetup"
)
func hwaf_make_cmd_asetup() *commander.Command {
cmd := &commander.Command{
Run: hwaf_run_cmd_asetup,
UsageLine: "asetup [options] <args>",
Short: "setup a workarea with Athena-like defaults",
Long: `
asetup sets up a workarea with Athena-like defaults.
ex:
$ mkdir my-work-area && cd my-work-area
$ hwaf asetup
$ hwaf asetup mana,20121207
$ hwaf asetup mana 20121207
$ hwaf asetup -arch=64 mana 20121207
$ hwaf asetup -comp=gcc44 mana 20121207
$ hwaf asetup -os=centos6 mana 20121207
$ hwaf asetup -type=opt mana 20121207
$ hwaf asetup -cmtcfg=x86_64-slc6-gcc44-opt mana 20121207
$ CMTCFG=x86_64-slc6-gcc44-opt \
hwaf asetup mana 20121207
`,
Flag: *flag.NewFlagSet("hwaf-setup", flag.ExitOnError),
}
//cmd.Flag.String("p", "", "List of paths to projects to setup against")
//cmd.Flag.String("cfg", "", "Path to a configuration file")
cmd.Flag.Bool("v", false, "enable verbose mode")
cmd.Flag.String("arch", "", "explicit architecture to use (32/64)")
cmd.Flag.String("comp", "", "explicit compiler name to use (ex: gcc44, clang32,...)")
cmd.Flag.String("os", "", "explicit system name to use (ex: slc6, slc5, centos6, darwin106,...)")
cmd.Flag.String("type", "", "explicit build variant to use (ex: opt/dbg)")
cmd.Flag.String("cmtcfg", "", "explicit CMTCFG value to use")
return cmd
}
func hwaf_run_cmd_asetup(cmd *commander.Command, args []string) {
var err error
err = asetup.Run(g_ctx, cmd, args)
handle_err(err)
}
// EOF