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
55PreferredProfile : " g++"
66
77# List of compiler/linker profiles that instruct how to compile/link
8- CompilerProfiles :
8+ Profiles :
99- Name : " g++"
1010
1111 # The file extensions associated with the profile
@@ -16,111 +16,151 @@ CompilerProfiles:
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 extension for the object files for each platform
24- ObjectFileExtensions :
25- Windows : obj
26- Unix : o
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"
2726
28- # The file extensions for the shared libraries for each platform
29- SharedLibraryExtensions :
30- Windows : [dll, lib]
31- Linux : [so]
32- MacOS : [dylib]
27+ # Each of the platform dependent settings can be listed under
28+ # - All
29+ # - Windows
30+ # - Linux
31+ # - MacOS
32+ # - Unix
3333
34- # The file extensions for the static libraries for each platform
35- StaticLibraryExtensions :
36- Windows : [lib]
37- Unix : [a]
34+ # The file properties for the object files for each platform.
35+ ObjectLinkFile :
36+ Prefix :
37+ All : " "
38+ Extension :
39+ Windows : " .obj"
40+ Unix : " .o"
41+
42+ # The file properties for the files to be **linked** as shared libraries for each platform
43+ SharedLinkFile :
44+ Prefix :
45+ Windows : " "
46+ Linux : " lib"
47+ MacOS : " "
48+ Extension :
49+ Windows : " .lib"
50+ Linux : " .so"
51+ MacOS : " .dylib"
52+
53+ # The file properties for the files to be **copied** as shared libraries for each platform
54+ SharedLibraryFile :
55+ Prefix :
56+ Windows : " "
57+ Linux : " lib"
58+ MacOS : " "
59+ Extension :
60+ Windows : " .dll"
61+ Linux : " .so"
62+ MacOS : " .dylib"
3863
39- # (Optional) The file extensions for debug symbols to be copied alongside the binary
40- DebugSymbolFileExtensions :
41- Windows : []
42- Unix : []
64+ # The file properties for the files to be linked as static libraries for each platform
65+ StaticLinkFile :
66+ Prefix :
67+ Unix : " lib"
68+ Windows : " "
69+ Extension :
70+ Windows : " .lib"
71+ Unix : " .a"
4372
44- # Specify the compiler settings, so the final flow will be:
45- # [Setup steps if any] --> {Executable} {CompileArgs}
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: ""
82+
83+ # Specify the compiler settings
4684 Compiler :
4785 # (Optional) The command to run together before running each compile command
48- EnvironmentSetup :
49- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
50- All : " "
86+ # in **shell** for each platform
87+ # EnvironmentSetup:
88+ # All: ""
5189
5290 # Executable to be called
5391 Executable : " g++"
5492
55- # 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
5695 DefaultCompileFlags :
57- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
5896 All : " -std=c++17 -Wall -Werror"
5997
60- # Flags for compiling to an executable
98+ # Flags for compiling to an executable for each platform
6199 ExecutableCompileFlags :
62- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
63100 All : " "
64101
65- # Flags for compiling to a static library
102+ # Flags for compiling to a static library for each platform
66103 StaticLibCompileFlags :
67- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
68104 All : " "
69105
70- # Flags for compiling to a shared library
106+ # Flags for compiling to a shared library for each platform
71107 SharedLibCompileFlags :
72- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
73- All : " "
108+ All : " -fpic"
74109
75- # The syntax to compile the given file.
76- # [Setup steps if any] -->
77- # {Executable} {CompilePart} {IncludePart}...(for each dependency) {InputPart} {OutputPart}
78- # {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}
79113 CompileArgs :
114+ # {CompileFlags} will be replaced by *CompileFlags set above depending on what
115+ # we are compiling
80116 CompilePart : " -c {CompileFlags}"
81- IncludePart : " -I{IncludePath}"
82- InputPart : " {InputFile}"
83- 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}"
84126
85- # Specify the linker settings, so the final flow will be:
86- # [Setup steps if any] --> {Executable} {OutputPart} {DependenciesPart}...(for each dependency)
127+ # Specify the linker settings
87128 Linker :
88- # (Optional) The command to run together before running each link command
89- EnvironmentSetup :
90- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
91- All : " "
129+ # (Optional) The command to run together before running each link command
130+ # in **shell** for each platform
131+ # EnvironmentSetup:
132+ # All: ""
92133
93134 # Executable to be called
94135 Executable : " g++"
95136
96137 # Default arguments to provide for linking dependencies to the binary,
97- # which can be overridden by the script
138+ # which can be overridden by the script for each platform
98139 DefaultLinkFlags :
99- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
100140 All : " "
101141
102- # Flags for linking as an executable
142+ # Flags for linking as an executable for each platform
103143 ExecutableLinkFlags :
104- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
105- All : " "
144+ All : " -Wl,-rpath,\\ $ORIGIN"
106145
107- # Flags for linking as a static library
146+ # Flags for linking as a static library for each platform
108147 StaticLibLinkFlags :
109- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
110148 All : " "
111149
112- # Flags for linking as a shared library
150+ # Flags for linking as a shared library for each platform
113151 SharedLibLinkFlags :
114- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
115- All : " "
152+ Unix : " -shared -Wl,-rpath, \\ $ORIGIN "
153+ Windows : " -shared -Wl,-rpath,$ORIGIN "
116154
117- # The syntax to link the given file
118- LinkerArgs :
119- # Syntax for outputting to the binary.
120- # {LinkFlags}, {OutputFile}, {ObjectFile} will be replaced accordingly
121- OutputPart : " {LinkFlags} -o {OutputFile} {ObjectFile}"
155+ # The link syntax in shell for a given file:
156+ # {OutputPart} {LinkPart}...(for script object file and each dependencies if any)
157+ LinkArgs :
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}"
122163
123- # Syntax for linking each dependency.
124- # {DependencyFile} will be replaced accordingly
125- # DependenciesPart: "-l:{DependencyFile}"
126- DependenciesPart : " {DependencyFile}"
164+ # {LinkFilePath} will be replaced by the path to the object file
165+ # we are linking against
166+ LinkPart : " {LinkFilePath}"
0 commit comments