Browse Source

PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM

Fix logic added by commit 1f791eb160 (Multi-Ninja: Fix reusable PCHs for
MSVC, 2020-05-24, v3.18.0-rc1~72^2) to avoid an unnecessary delay.

Fixes: #21054
Cristian Adam 5 years ago
parent
commit
ef97fbe6c2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmLocalGenerator.cxx

+ 1 - 1
Source/cmLocalGenerator.cxx

@@ -2789,7 +2789,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
     }
     file << "      break()\n"
          << "    endif()\n";
-    file << "  else()\n"
+    file << "  elseif(NOT EXISTS \"" << from_file << "\")\n"
          << "    execute_process(COMMAND ${CMAKE_COMMAND}"
          << " -E sleep 1)\n"
          << "  endif()\n";