2021-09-16 19:36:35 +08:00
|
|
|
const DefaultVersions: Record<string, string> = {
|
|
|
|
msvc: "2019",
|
|
|
|
llvm: "11",
|
|
|
|
ninja: "1.10.2",
|
|
|
|
cmake: "3.20.2",
|
2021-09-16 20:09:01 +08:00
|
|
|
gcovr: "5.0",
|
2021-09-16 20:13:30 +08:00
|
|
|
conan: "1.40.1",
|
2021-09-16 20:09:01 +08:00
|
|
|
meson: "0.59.1",
|
|
|
|
python: "3.x",
|
2021-09-17 07:21:11 +08:00
|
|
|
gcc: process.platform === "win32" ? "10.2.0" : "11",
|
2021-09-16 19:36:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Get the default version if passed true or undefined, otherwise return the version itself */
|
|
|
|
export function getVersion(name: string, version: string | undefined) {
|
2021-09-16 19:57:37 +08:00
|
|
|
if (version === "true" || (version === undefined && name in DefaultVersions)) {
|
2021-09-16 19:36:35 +08:00
|
|
|
return DefaultVersions[name]
|
|
|
|
} else {
|
|
|
|
return version
|
|
|
|
}
|
|
|
|
}
|