2021-09-16 19:36:35 +08:00
|
|
|
const DefaultVersions: Record<string, string> = {
|
2021-11-22 02:00:51 +08:00
|
|
|
llvm: "13.0.0",
|
2022-01-30 07:46:53 +08:00
|
|
|
clangtidy: "13.0.0",
|
|
|
|
clangformat: "13.0.0",
|
2021-09-16 19:36:35 +08:00
|
|
|
ninja: "1.10.2",
|
2022-01-23 09:17:56 +08:00
|
|
|
cmake: "3.22.1",
|
2021-09-16 20:09:01 +08:00
|
|
|
gcovr: "5.0",
|
2022-01-23 09:17:56 +08:00
|
|
|
conan: "1.44.1",
|
|
|
|
meson: "0.61.1",
|
|
|
|
python: "3.8.10",
|
2021-12-07 19:30:33 +08:00
|
|
|
kcov: "v39",
|
2022-01-31 07:33:48 +08:00
|
|
|
task: "3.10.0",
|
2022-02-04 13:38:59 +08:00
|
|
|
doxygen: process.platform === "win32" ? "1.9.3.20220106" : "1.9.3",
|
2021-11-22 02:00:51 +08:00
|
|
|
gcc: process.platform === "win32" ? "11.2.0.07112021" : "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 {
|
2021-09-18 01:12:33 +08:00
|
|
|
return version ?? ""
|
2021-09-16 19:36:35 +08:00
|
|
|
}
|
|
|
|
}
|