Skip to content

Commit 04b67ba

Browse files
Updating documentations
1 parent 83c1f9f commit 04b67ba

File tree

4 files changed

+175
-41
lines changed

4 files changed

+175
-41
lines changed

Src/runcpp2/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ int main(int argc, char* argv[])
288288
ssLOG_BASE(" -c, --[c]onfig <file> Use specified config file instead of default");
289289
ssLOG_BASE(" -t, --create-script-[t]emplate <file> Creates/prepend runcpp2 script info template");
290290
ssLOG_BASE(" -s, --build-[s]ource-only (Re)Builds source files only without building dependencies.");
291-
ssLOG_BASE(" The previous built binaries will be used for dependencies.");
292-
ssLOG_BASE(" Requires dependencies to be built already.");
291+
ssLOG_BASE(" The previous built binaries will be used for dependencies.");
292+
ssLOG_BASE(" Requires dependencies to be built already.");
293293
ssLOG_BASE(" -j, --[j]obs Maximum number of threads running. Defaults to 8");
294294
ssLOG_BASE(" Reset/Cleanup:");
295295
ssLOG_BASE(" -rc, --[r]eset-[c]ache Deletes compiled source files cache only");

mkdocs/docs/TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- Add branch/tag option for git
88
- Add initialize submodule option for git
99
- Allow runcpp2 to be library for scriptable pipeline
10-
- Async/Multi-thread compile and dependencies processing
1110
- Smoother CMake support by reading cmake target properties (https://stackoverflow.com/a/56738858/23479578)
1211
- Add the ability for user to specify custom substitution options which applies to all fields
1312
- Add the ability to append defines coming from the dependencies

mkdocs/docs/build_settings.md

Lines changed: 170 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,5 @@
11
# Build Settings
22

3-
## Special Types
4-
5-
### `platform profile map`
6-
- Type: `Platforms Map With Profiles Map`
7-
- Description: A map of platforms with a map of profiles.
8-
9-
??? TODO
10-
If platform and profile are not specified, the default platform and profile are used.
11-
12-
???+ Example
13-
```yaml
14-
Windows:
15-
"g++":
16-
ExampleSetting: "ExampleValue"
17-
Linux:
18-
"g++":
19-
ExampleSetting: "ExampleValue"
20-
MacOS:
21-
"g++":
22-
ExampleSetting: "ExampleValue"
23-
```
24-
25-
### `platform profile list`
26-
- Type: `Platforms Map With Profiles List`
27-
- Description: A map of platforms with a list of profiles.
28-
29-
???+ Example
30-
```yaml
31-
Windows: ["g++", "msvc"]
32-
Linux: ["g++"]
33-
MacOS: ["g++"]
34-
```
35-
363
## Special Keywords
374

385
### `DefaultPlatform`
@@ -52,11 +19,19 @@
5219
- Optional: `true`
5320
- Default: `false`
5421
- Description: Whether to pass the script path as the second parameter when running in additional to the binary path.
22+
??? example
23+
```yaml
24+
PassScriptPath: false
25+
```
5526
- `Language`
5627
- Type: `string`
5728
- Optional: `true`
5829
- Default: Determined by file extension
5930
- Description: The language of the script.
31+
??? example
32+
```yaml
33+
Language: "c++"
34+
```
6035
- `BuildType`
6136
- Type: `enum string`, can be one of the following:
6237
- `Executable`
@@ -66,11 +41,22 @@
6641
- Optional: `true`
6742
- Default: `Executable`
6843
- Description: The type of output to build.
44+
??? example
45+
```yaml
46+
BuildType: Executable
47+
```
6948
- `RequiredProfiles`
7049
- Type: `platform profile list`
7150
- Optional: `true`
7251
- Default: None
7352
- Description: The profiles that are required for the script to be built. No profiles are required if this field is empty.
53+
??? example
54+
```yaml
55+
RequiredProfiles:
56+
Windows: ["g++"]
57+
Linux: ["g++"]
58+
MacOS: ["g++"]
59+
```
7460
- `OverrideCompileFlags`
7561
- Type: `platform profile map`
7662
- Optional: `true`
@@ -87,6 +73,14 @@
8773
- Optional: `true`
8874
- Default: None
8975
- Description: The compile flags to append for each platform and profile.
76+
??? example
77+
```yaml
78+
OverrideCompileFlags:
79+
DefaultPlatform:
80+
"g++":
81+
Remove: "-flagA -flagB"
82+
Append: "-flagC -flagD"
83+
```
9084
- `OverrideLinkFlags`
9185
- Type: `platform profile map` with child fields
9286
- Optional: `true`
@@ -103,46 +97,185 @@
10397
- Optional: `true`
10498
- Default: None
10599
- Description: The link flags to append for each platform and profile.
100+
??? example
101+
```yaml
102+
OverrideLinkFlags:
103+
DefaultPlatform:
104+
"g++":
105+
Remove: "-flagA -flagB"
106+
Append: "-flagC -flagD"
107+
```
106108
- `OtherFilesToBeCompiled`
107109
- Type: `platform profile map` with `list` of `string`
108110
- Optional: `true`
109111
- Default: None
110112
- Description: The source files to be compiled for each platform and profile.
113+
??? example
114+
```yaml
115+
OtherFilesToBeCompiled:
116+
DefaultPlatform:
117+
DefaultProfile:
118+
- "./AnotherSourceFile.cpp"
119+
```
111120
- `IncludePaths`
112121
- Type: `platform profile map` with `list` of `string`
113122
- Optional: `true`
114123
- Default: None
115124
- Description: The include paths to be used for each platform and profile.
125+
??? example
126+
```yaml
127+
IncludePaths:
128+
DefaultPlatform:
129+
DefaultProfile:
130+
- "./include"
131+
- "./src/include"
132+
```
116133
- `Defines`
117134
- Type: `platform profile map` with `list` of `string`
118135
- Optional: `true`
119136
- Default: None
120137
- Description: The defines to be used for each platform and profile.
138+
??? example
139+
```yaml
140+
Defines:
141+
DefaultPlatform:
142+
DefaultProfile:
143+
- "EXAMPLE_DEFINE" # Define without a value
144+
- "VERSION_MAJOR=1" # Define with a value
145+
```
121146
- `Setup`
122147
- Type: `platform profile map` with `list` of `string`
123148
- Optional: `true`
124149
- Default: None
125150
- Description: The setup commands to be used for each platform and profile.
151+
??? example
152+
```yaml
153+
Setup:
154+
DefaultPlatform:
155+
DefaultProfile:
156+
- "echo Setting up script..."
157+
```
126158
- `PreBuild`
127159
- Type: `platform profile map` with `list` of `string`
128160
- Optional: `true`
129161
- Default: None
130162
- Description: The pre-build commands to be used for each platform and profile.
163+
??? example
164+
```yaml
165+
PreBuild:
166+
DefaultPlatform:
167+
DefaultProfile:
168+
- "echo Starting build..."
169+
```
131170
- `PostBuild`
132171
- Type: `platform profile map` with `list` of `string`
133172
- Optional: `true`
134173
- Default: None
135174
- Description: The post-build commands to be used for each platform and profile.
175+
??? example
176+
```yaml
177+
PostBuild:
178+
DefaultPlatform:
179+
DefaultProfile:
180+
- "echo Build completed..."
181+
```
136182
- `Cleanup`
137183
- Type: `platform profile map` with `list` of `string`
138184
- Optional: `true`
139185
- Default: None
140186
- Description: The cleanup commands to be used for each platform and profile.
187+
??? example
188+
```yaml
189+
Cleanup:
190+
DefaultPlatform:
191+
DefaultProfile:
192+
- "echo Cleaning up script..."
193+
```
141194
- `Dependencies`
142195
- Type: `list` of `dependency entry`
143196
- Optional: `true`
144197
- Default: None
145198
- Description: The dependencies to be used for each platform and profile.
199+
??? example
200+
```yaml
201+
Dependencies:
202+
- Name: MyLibrary
203+
Platforms: [Windows, Linux, MacOS]
204+
Source:
205+
# ImportPath: "config/dependency.yaml"
206+
Git:
207+
URL: "https://github.com/MyUser/MyLibrary.git"
208+
# Local:
209+
# Path: "./libs/LocalLibrary"
210+
# CopyMode: "Auto"
211+
LibraryType: Static
212+
IncludePaths:
213+
- "src/include"
214+
LinkProperties:
215+
DefaultPlatform:
216+
"g++":
217+
SearchLibraryNames: ["MyLibrary"]
218+
ExcludeLibraryNames: []
219+
SearchDirectories: ["./build"]
220+
AdditionalLinkOptions: []
221+
Setup:
222+
DefaultPlatform:
223+
"g++":
224+
- "mkdir build"
225+
Build:
226+
DefaultPlatform:
227+
"g++":
228+
- "cd build && cmake .."
229+
- "cd build && cmake --build ."
230+
Cleanup:
231+
Linux:
232+
"g++":
233+
- "sudo apt purge MyLibrary"
234+
FilesToCopy:
235+
DefaultPlatform:
236+
DefaultProfile:
237+
- "assets/textures/sprite.png"
238+
Windows:
239+
"msvc":
240+
- "assets/textures/sprite.png"
241+
- "assets/fonts/windows_specific_font.ttf"
242+
Linux:
243+
"g++":
244+
- "assets/textures/sprite.png"
245+
- "assets/shaders/linux_optimized_shader.glsl"
246+
```
247+
## Special Types
248+
249+
### `platform profile map`
250+
- Type: `Platforms Map With Profiles Map`
251+
- Description: A map of platforms with a map of profiles.
252+
253+
??? TODO
254+
If platform and profile are not specified, the default platform and profile are used.
255+
256+
???+ Example
257+
```yaml
258+
Windows:
259+
"g++":
260+
ExampleSetting: "ExampleValue"
261+
Linux:
262+
"g++":
263+
ExampleSetting: "ExampleValue"
264+
MacOS:
265+
"g++":
266+
ExampleSetting: "ExampleValue"
267+
```
268+
269+
### `platform profile list`
270+
- Type: `Platforms Map With Profiles List`
271+
- Description: A map of platforms with a list of profiles.
272+
273+
???+ Example
274+
```yaml
275+
Windows: ["g++", "msvc"]
276+
Linux: ["g++"]
277+
MacOS: ["g++"]
278+
```
146279

147280
### `dependency entry`
148281
- Type: `map`
@@ -205,14 +338,17 @@
205338
- `Object`
206339
- `Shared`
207340
- `Header`
341+
- Optional: `true`, only if `Source.ImportPath` is specified
342+
- Default: None
343+
- Description: The type of this dependency
208344
- `IncludePaths`
209345
- Type: `list` of `string`
210346
- Optional: `true`
211347
- Default: None
212348
- Description: The include paths to be used for the dependency.
213349
- `LinkProperties`
214350
- Type: `map` with child fields
215-
- Optional: `true` if `LibraryType` is `Header`
351+
- Optional: `true` if `LibraryType` is `Header` or `Source.ImportPath` is specified
216352
- Default: None
217353
- Description: The link properties to be used for the dependency.
218354
- Child Fields:
@@ -257,8 +393,6 @@
257393
- Default: None
258394
- Description: The files to be copied to the output directory for each platform and profile.
259395

260-
261-
262396
## Template
263397

264398
```yaml

mkdocs/docs/program_manual.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Run/Build:
1313
-c, --[c]onfig <file> Use specified config file instead of default
1414
-t, --create-script-[t]emplate <file> Creates/prepend runcpp2 script info template
1515
-s, --build-[s]ource-only (Re)Builds source files only without building dependencies.
16-
The previous built binaries will be used for dependencies.
17-
Requires dependencies to be built already.
16+
The previous built binaries will be used for dependencies.
17+
Requires dependencies to be built already.
18+
-j, --[j]obs Maximum number of threads running. Defaults to 8
1819
Reset/Cleanup:
1920
-rc, --[r]eset-[c]ache Deletes compiled source files cache only
2021
-ru, --[r]eset-[u]ser-config Replace current user config with the default one

0 commit comments

Comments
 (0)