1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-21 23:00:50 +08:00

VS: Isolate custom command input/output generation scopes

This commit is contained in:
Brad King
2019-05-30 13:47:26 -04:00
parent f872033d75
commit fcedf8e552

View File

@@ -1354,6 +1354,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
std::string script = lg->ConstructScript(ccg);
// input files for custom command
std::stringstream inputs;
{
inputs << source->GetFullPath();
for (std::string const& d : ccg.GetDepends()) {
std::string dep;
@@ -1362,8 +1363,10 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
inputs << ";" << dep;
}
}
}
// output files for custom command
std::stringstream outputs;
{
const char* sep = "";
for (std::string const& o : ccg.GetOutputs()) {
std::string out = o;
@@ -1371,6 +1374,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
outputs << sep << out;
sep = ";";
}
}
if (this->ProjectType == csproj) {
std::string name = "CustomCommand_" + c + "_" +
cmSystemTools::ComputeStringMD5(sourcePath);