FASTBuild: Disable caching and distribution in try_compile builds

This avoids hashing the whole toolchain and makes `try_compile` faster.
This commit is contained in:
Eduard Voronkin authored and Brad King committed 2025-10-27 16:59:29 -04:00
1 parent 009f1ab0e3
commit f6abf8044a
1 file changed
+4
+4
View File
@@ -893,6 +893,10 @@ void cmGlobalFastbuildGenerator::WriteCompilers()
}
WriteVariable("Executable", Quote(compilerPath), 1);
WriteVariable("CompilerFamily", Quote(compilerDef.CompilerFamily), 1);
if (this->GetCMakeInstance()->GetIsInTryCompile()) {
WriteVariable("AllowCaching", "false", 1);
WriteVariable("AllowDistribution", "false", 1);
}
if (compilerDef.UseLightCache && compilerDef.CompilerFamily == "msvc") {
WriteVariable("UseLightCache_Experimental", "true", 1);