Skip to content

Commit 30ce936

Browse files
Updating yamls and substition names
1 parent f831ab4 commit 30ce936

File tree

4 files changed

+222
-172
lines changed

4 files changed

+222
-172
lines changed

DefaultYAMLs/DefaultScriptInfo.yaml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,40 @@
44
# (Optional) Language of the script
55
Language: "c++"
66

7-
# (Optional) Preferred compiler/linker profiles for the script
7+
# Each of the platform dependent settings can be listed under
8+
# - All
9+
# - Windows
10+
# - Linux
11+
# - MacOS
12+
# - Unix
13+
14+
# (Optional) Preferred compiler/linker profiles for the script for each platform
815
RequiredProfiles:
916
Windows: ["g++"]
1017
Linux: ["g++"]
1118
MacOS: ["g++"]
1219

13-
# (Optional) Override the default compile flags
20+
# (Optional) Override the default compile flags for each platform
1421
OverrideCompileFlags:
15-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
1622
All:
1723
# Profile with the respective flags to override
1824
"g++":
19-
# Flags to be removed from the default compile flags, separated by space
25+
# (Optional) Flags to be removed from the default compile flags, separated by space
2026
Remove: ""
2127

22-
# Additional flags to be appended to the default compile flags, separated by space
28+
# (Optional) Additional flags to be appended to the default compile flags, separated by space
2329
Append: ""
2430

2531

26-
# (Optional) Override the default link flags
32+
# (Optional) Override the default link flags for each platform
2733
OverrideLinkFlags:
28-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
2934
All:
3035
# Profile with the respective flags to override
3136
"g++":
32-
# Flags to be removed from the default link flags, separated by space
37+
# (Optional) Flags to be removed from the default link flags, separated by space
3338
Remove: ""
3439

35-
# Additional flags to be appended to the default link flags, separated by space
40+
# (Optional) Additional flags to be appended to the default link flags, separated by space
3641
Append: ""
3742

3843
# (Optional) The list of dependencies needed by the script
@@ -55,7 +60,7 @@ Dependencies:
5560
IncludePaths:
5661
- "src/include"
5762

58-
# (Optional) Link properties of the dependency
63+
# (Optional if LibraryType is Header) Link properties of the dependency
5964
LinkProperties:
6065
# Properties for searching the library binary for the profile
6166
"g++":
@@ -68,17 +73,15 @@ Dependencies:
6873
# The path (relative to the dependency folder) to be searched for the dependency binaries
6974
SearchDirectories: ["./build"]
7075

71-
# (Optional) Additional link options for this dependency
76+
# (Optional) Additional link options for this dependency for each platform
7277
AdditionalLinkOptions:
73-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
7478
All: []
7579

7680

77-
# (Optional) List of setup commands for the supported platforms
81+
# (Optional) List of setup commands for each platform
7882
Setup:
79-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
8083
All:
81-
# Setup commands for the specified profile.
84+
# Setup shell commands for the specified profile.
8285
# All commands are run in the dependency folder
8386
"g++":
8487
- "mkdir build"
Lines changed: 73 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# yaml-language-server: $schema=./UserConfigSchema.json
22

33
---
4-
# A default compiler profile to be used if not specified while running the build script
4+
# A profile to be used if not specified while running the build script
55
PreferredProfile: "g++"
66

77
# List of compiler/linker profiles that instruct how to compile/link
@@ -16,20 +16,30 @@ Profiles:
1616

1717
# (Optional) Steps to run before calling the compiler/linker.
1818
# This is run inside the .runcpp2 directory where the build happens.
19-
SetupSteps:
20-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
21-
All: []
19+
# SetupSteps:
20+
# # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
21+
# All: []
2222

23-
# The file properties for the object files for each platform
23+
# The following fields set the prefixes and extensions for each type of the files
24+
# If the name of an object files are libtest.so and libtest2.so,
25+
# the prefixes and extensions are "lib" and ".so"
26+
27+
# Each of the platform dependent settings can be listed under
28+
# - All
29+
# - Windows
30+
# - Linux
31+
# - MacOS
32+
# - Unix
33+
34+
# The file properties for the object files for each platform.
2435
ObjectLinkFile:
2536
Prefix:
26-
Windows: ""
27-
Unix: ""
37+
All: ""
2838
Extension:
2939
Windows: ".obj"
3040
Unix: ".o"
3141

32-
# The file properties for the files to be linked as shared libraries for each platform
42+
# The file properties for the files to be **linked** as shared libraries for each platform
3343
SharedLinkFile:
3444
Prefix:
3545
Windows: ""
@@ -40,7 +50,7 @@ Profiles:
4050
Linux: ".so"
4151
MacOS: ".dylib"
4252

43-
# The file properties for the files to be copied as shared libraries for each platform
53+
# The file properties for the files to be **copied** as shared libraries for each platform
4454
SharedLibraryFile:
4555
Prefix:
4656
Windows: ""
@@ -60,95 +70,97 @@ Profiles:
6070
Windows: ".lib"
6171
Unix: ".a"
6272

63-
# (Optional) The file properties for debug symbols to be copied alongside the binary
64-
DebugSymbolFile:
65-
Prefix:
66-
Windows: ""
67-
Unix: ""
68-
Extension:
69-
Windows: ""
70-
Unix: ""
73+
# (Optional) The file properties for debug symbols to be copied alongside the binary
74+
# for each platform
75+
# DebugSymbolFile:
76+
# Prefix:
77+
# Windows: ""
78+
# Unix: ""
79+
# Extension:
80+
# Windows: ""
81+
# Unix: ""
7182

72-
# Specify the compiler settings, so the final flow will be:
73-
# [Setup steps if any] --> {Executable} {CompileArgs}
83+
# Specify the compiler settings
7484
Compiler:
7585
# (Optional) The command to run together before running each compile command
76-
EnvironmentSetup:
77-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
78-
All: ""
86+
# in **shell** for each platform
87+
# EnvironmentSetup:
88+
# All: ""
7989

8090
# Executable to be called
8191
Executable: "g++"
8292

83-
# Default arguments to provide for compilation which can be overridden by the script
93+
# Default arguments to provide for compilation which can be overridden
94+
# by the script for each platform
8495
DefaultCompileFlags:
85-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
8696
All: "-std=c++17 -Wall -Werror"
8797

88-
# Flags for compiling to an executable
98+
# Flags for compiling to an executable for each platform
8999
ExecutableCompileFlags:
90-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
91100
All: ""
92101

93-
# Flags for compiling to a static library
102+
# Flags for compiling to a static library for each platform
94103
StaticLibCompileFlags:
95-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
96104
All: ""
97105

98-
# Flags for compiling to a shared library
106+
# Flags for compiling to a shared library for each platform
99107
SharedLibCompileFlags:
100-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
101108
All: "-fpic"
102109

103-
# The syntax to compile the given file.
104-
# [Setup steps if any] -->
105-
# {Executable} {CompilePart} {IncludePart}...(for each dependency) {InputPart} {OutputPart}
106-
# {CompileFlags}, {IncludePath}, {InputFile}, {ObjectFile} will be replaced accordingly
110+
# The compile syntax in shell for a given file:
111+
# {Executable} {CompilePart} [ {IncludePart}...(for each dependency) ]
112+
# {InputPart} {OutputPart}
107113
CompileArgs:
114+
# {CompileFlags} will be replaced by *CompileFlags set above depending on what
115+
# we are compiling
108116
CompilePart: "-c {CompileFlags}"
109-
IncludePart: "-I{IncludePath}"
110-
InputPart: "{InputFile}"
111-
OutputPart: "-o {ObjectFile}"
117+
118+
# {IncludeDirectoryPath} will be replaced by the IncludePaths set by the dependencies
119+
IncludePart: "-I{IncludeDirectoryPath}"
120+
121+
# {InputFilePath} will be replaced by the path to the script we are trying to compile
122+
InputPart: "{InputFilePath}"
123+
124+
# {ObjectFilePath} will be replaced by the path to the output object file
125+
OutputPart: "-o {ObjectFilePath}"
112126

113-
# Specify the linker settings, so the final flow will be:
114-
# [Setup steps if any] --> {Executable} {OutputPart} {DependenciesPart}...(for each dependency)
127+
# Specify the linker settings
115128
Linker:
116-
# (Optional) The command to run together before running each link command
117-
EnvironmentSetup:
118-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
119-
All: ""
129+
# (Optional) The command to run together before running each link command
130+
# in **shell** for each platform
131+
# EnvironmentSetup:
132+
# All: ""
120133

121134
# Executable to be called
122135
Executable: "g++"
123136

124137
# Default arguments to provide for linking dependencies to the binary,
125-
# which can be overridden by the script
138+
# which can be overridden by the script for each platform
126139
DefaultLinkFlags:
127-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
128140
All: ""
129141

130-
# Flags for linking as an executable
142+
# Flags for linking as an executable for each platform
131143
ExecutableLinkFlags:
132-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
133-
All: ""
144+
All: "-Wl,-rpath,\\$ORIGIN"
134145

135-
# Flags for linking as a static library
146+
# Flags for linking as a static library for each platform
136147
StaticLibLinkFlags:
137-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
138148
All: ""
139149

140-
# Flags for linking as a shared library
150+
# Flags for linking as a shared library for each platform
141151
SharedLibLinkFlags:
142-
# Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
143-
All: "-shared -Wl,-rpath,\\$ORIGIN"
152+
Unix: "-shared -Wl,-rpath,\\$ORIGIN"
153+
Windows: "-shared -Wl,-rpath,$ORIGIN"
144154

145-
# The syntax to link the given file
155+
# The link syntax in shell for a given file:
156+
# {OutputPart} {LinkPart}...(for script object file and each dependencies if any)
146157
LinkArgs:
147-
# Syntax for outputting to the binary.
148-
# {LinkFlags}, {OutputFile}, {ObjectFile} will be replaced accordingly
149-
OutputPart: "{LinkFlags} -o {OutputFile} {ObjectFile}"
158+
# {LinkFlags} will be replaced by *LinkFlags set above depending on what
159+
# we are linking to
160+
#
161+
# {OutputFilePath} will be replaced by the path to the output file
162+
OutputPart: "{LinkFlags} -o {OutputFilePath}"
150163

151-
# Syntax for linking each dependency.
152-
# {LinkFile} will be replaced accordingly
153-
# LinkPart: "-l:{LinkFile}"
154-
LinkPart: "{LinkFile}"
164+
# {LinkFilePath} will be replaced by the path to the object file
165+
# we are linking against
166+
LinkPart: "{LinkFilePath}"

0 commit comments

Comments
 (0)