Ninja: don't parse empty string
This commit is contained in:
parent
e405380d06
commit
f212615d3e
|
@ -398,12 +398,15 @@ cmNinjaTargetGenerator
|
|||
depfile = "$DEP_FILE";
|
||||
const std::string flagsName = "CMAKE_DEPFILE_FLAGS_" + lang;
|
||||
std::string depfileFlags = mf->GetSafeDefinition(flagsName.c_str());
|
||||
if (!depfileFlags.empty())
|
||||
{
|
||||
cmSystemTools::ReplaceString(depfileFlags, "<DEPFILE>", "$DEP_FILE");
|
||||
cmSystemTools::ReplaceString(depfileFlags, "<OBJECT>", "$out");
|
||||
cmSystemTools::ReplaceString(depfileFlags, "<CMAKE_C_COMPILER>",
|
||||
mf->GetDefinition("CMAKE_C_COMPILER"));
|
||||
flags += " " + depfileFlags;
|
||||
}
|
||||
}
|
||||
|
||||
vars.Flags = flags.c_str();
|
||||
vars.DependencyFile = depfile.c_str();
|
||||
|
|
Loading…
Reference in New Issue