File: xmake.md

package info (click to toggle)
workflow 0.11.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,744 kB
  • sloc: cpp: 33,792; ansic: 9,393; makefile: 9; sh: 6
file content (72 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download | duplicates (2)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# xmake compiling

```
// compile workflow library
xmake

// compile test
xmake -g test
// run test
xmake run -g test

// compile tutorial
xmake -g tutorial

// compile benchmark
xmake -g benchmark
```

## running

`xmake run -h` can see which targets you can run

Select a target to run, for instance:

```
xmake run tutorial-06-parallel_wget
```

## xmake install

```
sudo xmake install
```

## Compile static / shared library

```
// compile static lib
xmake f -k static
xmake -r
```

```
// compile shard lib
xmake f -k shared
xmake -r
```

`tips : -r means -rebuild`

## build options

`xmake f --help` can see our defined options.

```
Command options (Project Configuration):

        --workflow_inc=WORKFLOW_INC        workflow inc (default: /media/psf/pro/workflow/_include)
        --upstream=[y|n]                   build upstream component (default: y)
        --consul=[y|n]                     build consul component
        --workflow_lib=WORKFLOW_LIB        workflow lib (default: /media/psf/pro/workflow/_lib)
        --redis=[y|n]                      build redis component (default: y)
        --kafka=[y|n]                      build kafka component
        --mysql=[y|n]                      build mysql component (default: y)
```

You can cut or integrate each components with the following commands

```
xmake f --redis=n --kafka=y --mysql=n
xmake -r
```