浏览代码

PCH: Fix REUSE_FROM when Debug and RelWithDebInfo configs differ

If the Debug configuration contains `/ZI` but the RelWithDebInfo doesn't
then the copy_pdb_idb.cmake script will cause problems due to the fact
that it was common for both configurations but they are incompatible
with each other.
Cristian Adam 4 年之前
父节点
当前提交
95fa27d94d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/cmLocalGenerator.cxx

+ 2 - 2
Source/cmLocalGenerator.cxx

@@ -2698,8 +2698,8 @@ void cmLocalGenerator::CopyPchCompilePdb(
     cmStrCat(target->GetLocalGenerator()->GetCurrentBinaryDirectory(), "/",
              target->GetName(), ".dir/");
 
-  const std::string copy_script =
-    cmStrCat(target_compile_pdb_dir, "copy_idb_pdb.cmake");
+  const std::string copy_script = cmStrCat(
+    target_compile_pdb_dir, "copy_idb_pdb_", config.c_str(), ".cmake");
   cmGeneratedFileStream file(copy_script);
 
   file << "# CMake generated file\n";