Sfoglia il codice sorgente

Merge topic 'FASTBuild-optimize-try_compile' into release-4.2

f6abf8044a FASTBuild: Disable caching and distribution in try_compile builds

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11365
Brad King 1 mese fa
parent
commit
37d7b9820e
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      Source/cmGlobalFastbuildGenerator.cxx

+ 4 - 0
Source/cmGlobalFastbuildGenerator.cxx

@@ -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);