You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,21 @@ For more information, see [action.yml](./action.yml) and [GitHub Actions guide](
12
12
13
13
### Inputs
14
14
15
-
> Note: All inputs are optional.
16
-
17
15
| Name | Value Type | Description |
18
16
| --- | --- | --- |
19
17
|`source-dir`| Path | Source directory of the CMake project. Defaults to current directory. |
20
18
|`build-dir`| Path | Build directory of the CMake project. Defaults to `build` directory in current directory. |
21
-
|`targets`| Multiple strings | List of build targets. Could be specified more than one. Separate each target with a space or a new line. |
19
+
|`targets`| Multiple strings | List of build targets. |
22
20
|`generator`| String | Build system generator of the CMake project. |
23
21
|`c-compiler`| String | Preferred executable for compiling C language files. |
24
-
|`cxx-compiler`| String | Preferred executable for compiling CXX language files. |
25
-
|`c-flags`| Multiple strings | Additional flags passed when compiling C language files. Could be specified more than one. Separate each flag with a space or a new line. |
26
-
|`cxx-flags`| Multiple strings | Additional flags passed when compiling C++ language files. Could be specified more than one. Separate each flag with a space or a new line. |
27
-
|`args`| Multiple strings | Additional arguments passed during the CMake configuration. Could be specified more than one. Separate each target with a space or a new line. |
22
+
|`cxx-compiler`| String | Preferred executable for compiling C++ language files. |
23
+
|`c-flags`| Multiple strings | Additional flags passed when compiling C language files. |
24
+
|`cxx-flags`| Multiple strings | Additional flags passed when compiling C++ language files. |
25
+
|`args`| Multiple strings | Additional arguments passed during the CMake configuration. |
26
+
27
+
> Note: Multiple strings mean that the input could be specified with more than one value. Separate each value with a space or a new line.
28
+
29
+
> Note: All inputs are optional.
28
30
29
31
### Examples
30
32
@@ -45,7 +47,7 @@ jobs:
45
47
46
48
> Note: You can replace `@latest` with any version you like.
47
49
48
-
#### Using Different Directories
50
+
#### Specify the Source and the Build Directories
49
51
50
52
```yaml
51
53
- name: Configure and build this project
@@ -55,19 +57,21 @@ jobs:
55
57
build-dir: submodules/build
56
58
```
57
59
58
-
#### Build Custom Targets
60
+
#### Specify the Build Targets and Additional Options
59
61
60
62
```yaml
61
63
- name: Configure and build this project
62
64
uses: threeal/cmake-action@latest
63
65
with:
64
66
targets: hello_world_test fibonacci_test
67
+
c-flags: -Werror
68
+
cxx-flags: -Werror
65
69
args: |
70
+
-DCMAKE_BUILD_TYPE=Debug
66
71
-DBUILD_TESTING=ON
67
-
-DCMAKE_CXX_FLAGS='-Werror'
68
72
```
69
73
70
-
#### Build Using Ninja and Clang
74
+
#### Using Ninja as the Generator and Clang as the Compiler
0 commit comments