|
45 | 45 | ```yaml |
46 | 46 | BuildType: Executable |
47 | 47 | ``` |
| 48 | + |
| 49 | +!!! warning |
| 50 | + When you specify `BuildType` as `Executable`, it will still produce a **shared library** for running. |
| 51 | + Under the hood, runcpp2 simply loads the shared library and call the `main()` function. |
| 52 | + |
| 53 | + The reason of this behavior is because this makes it possible to "catch" if there's any |
| 54 | + missing external (shared) libraries that failed to be resolved, either because of missing |
| 55 | + `.dll`/`.so` or misconfigured search path. |
| 56 | + |
| 57 | + This allows runcpp2 to differentiate a failure on resolving shared library and if the program |
| 58 | + just returns a non-zero exit code. |
| 59 | + |
| 60 | + Therefore, when calling with the build flag `--build`, the output of the binary is **shared |
| 61 | + library instead of an executable**. This behavior can be **overridden** by passing the |
| 62 | + `--executable`/`-e` flag to force runcpp2 to produce the executable. |
| 63 | + |
48 | 64 | ### `RequiredProfiles` |
49 | 65 | - Type: `Platform Profile List` |
50 | 66 | - Optional: `true` |
|
58 | 74 | MacOS: ["g++"] |
59 | 75 | ``` |
60 | 76 | ### `OverrideCompileFlags` |
61 | | -- Type: `Platform Profile Map` |
| 77 | +- Type: `Platform Profile Map` with child fields |
62 | 78 | - Optional: `true` |
63 | 79 | - Default: None |
64 | | -- Description: The compile flags to override for each platform and profile. |
| 80 | +- Description: The compile flags to override for the profile being run under each platform. |
65 | 81 | - Child Fields: |
66 | 82 | - `Remove` |
67 | 83 | - Type: `string` |
68 | 84 | - Optional: `true` |
69 | 85 | - Default: None |
70 | | - - Description: The compile flags to remove for each platform and profile. |
| 86 | + - Description: The compile flags to remove for the profile being run. |
71 | 87 | - `Append` |
72 | 88 | - Type: `string` |
73 | 89 | - Optional: `true` |
74 | 90 | - Default: None |
75 | | - - Description: The compile flags to append for each platform and profile. |
| 91 | + - Description: The compile flags to append for the profile being run. |
76 | 92 | ??? example |
77 | 93 | ```yaml |
78 | 94 | OverrideCompileFlags: |
|
85 | 101 | - Type: `Platform Profile Map` with child fields |
86 | 102 | - Optional: `true` |
87 | 103 | - Default: None |
88 | | -- Description: The link flags to override for each platform and profile. |
| 104 | +- Description: The link flags to override for the profile being run under each platform. |
89 | 105 | - Child Fields: |
90 | 106 | - `Remove` |
91 | 107 | - Type: `string` |
92 | 108 | - Optional: `true` |
93 | 109 | - Default: None |
94 | | - - Description: The link flags to remove for each platform and profile. |
| 110 | + - Description: The link flags to remove for the profile being run. |
95 | 111 | - `Append` |
96 | 112 | - Type: `string` |
97 | 113 | - Optional: `true` |
98 | 114 | - Default: None |
99 | | - - Description: The link flags to append for each platform and profile. |
| 115 | + - Description: The link flags to append for the profile being run. |
100 | 116 | ??? example |
101 | 117 | ```yaml |
102 | 118 | OverrideLinkFlags: |
|
147 | 163 | - Type: `Platform Profile Map` with `list` of `string` |
148 | 164 | - Optional: `true` |
149 | 165 | - Default: None |
150 | | -- Description: The setup commands to be used for each platform and profile. |
| 166 | +- Description: The setup commands to be used for each platform and profile. This runs before the script built for the first time. |
151 | 167 | ??? example |
152 | 168 | ```yaml |
153 | 169 | Setup: |
|
159 | 175 | - Type: `Platform Profile Map` with `list` of `string` |
160 | 176 | - Optional: `true` |
161 | 177 | - Default: None |
162 | | -- Description: The pre-build commands to be used for each platform and profile. |
| 178 | +- Description: The pre-build commands to be used for each platform and profile. This runs before each build. |
163 | 179 | ??? example |
164 | 180 | ```yaml |
165 | 181 | PreBuild: |
|
171 | 187 | - Type: `Platform Profile Map` with `list` of `string` |
172 | 188 | - Optional: `true` |
173 | 189 | - Default: None |
174 | | -- Description: The post-build commands to be used for each platform and profile. |
| 190 | +- Description: The post-build commands to be used for each platform and profile. This runs after each build. |
175 | 191 | ??? example |
176 | 192 | ```yaml |
177 | 193 | PostBuild: |
|
183 | 199 | - Type: `Platform Profile Map` with `list` of `string` |
184 | 200 | - Optional: `true` |
185 | 201 | - Default: None |
186 | | -- Description: The cleanup commands to be used for each platform and profile. |
| 202 | +- Description: The cleanup commands to be used for each platform and profile. This runs when `--cleanup` command is specified. |
187 | 203 | ??? example |
188 | 204 | ```yaml |
189 | 205 | Cleanup: |
|
0 commit comments