Commit c87a35a3 authored by Brad King's avatar Brad King
Browse files

Do not call CollapseFullPath for PDB file names

Some vendor tools convert PDB file names given on the command line to
lower-case before creating the file.  When CMake places a mixed-case PDB
file name into the build system, the file does not exist the first time
and it is written with mixed case.  After the first build though the
native tool has created a lower-case version of the file.  If CMake does
CollapseFullPath again, the file exists so the actual-case lookup gets
the lower-case name.  This causes the build files to change so the
project rebuilds.

The solution is to avoid calling CollapseFullPath for files generated by
the build.  In the case of PDB files we already construct them from
paths that have been collapsed, so we can just skip the call altogether.
See issue #9350.
parent ef843428
......@@ -161,7 +161,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string targetFullPathImport = outpathImp + targetNameImport;
std::string targetOutPathPDB =
this->Convert(targetFullPathPDB.c_str(),
cmLocalGenerator::FULL,
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
// Convert to the output path to use in constructing commands.
std::string targetOutPath =
......
......@@ -426,7 +426,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// Construct the output path version of the names for use in command
// arguments.
std::string targetOutPathPDB =
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL,
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
std::string targetOutPath =
this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT,
......
......@@ -613,7 +613,7 @@ cmMakefileTargetGenerator
targetFullPathPDB += this->Target->GetPDBName(this->ConfigName);
}
targetOutPathPDB =
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL,
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
}
cmLocalGenerator::RuleVariables vars;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment