mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 14:40:48 +08:00
VS: Isolate custom command input/output generation scopes
This commit is contained in:
@@ -1354,22 +1354,26 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
|
|||||||
std::string script = lg->ConstructScript(ccg);
|
std::string script = lg->ConstructScript(ccg);
|
||||||
// input files for custom command
|
// input files for custom command
|
||||||
std::stringstream inputs;
|
std::stringstream inputs;
|
||||||
inputs << source->GetFullPath();
|
{
|
||||||
for (std::string const& d : ccg.GetDepends()) {
|
inputs << source->GetFullPath();
|
||||||
std::string dep;
|
for (std::string const& d : ccg.GetDepends()) {
|
||||||
if (lg->GetRealDependency(d, c, dep)) {
|
std::string dep;
|
||||||
ConvertToWindowsSlash(dep);
|
if (lg->GetRealDependency(d, c, dep)) {
|
||||||
inputs << ";" << dep;
|
ConvertToWindowsSlash(dep);
|
||||||
|
inputs << ";" << dep;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// output files for custom command
|
// output files for custom command
|
||||||
std::stringstream outputs;
|
std::stringstream outputs;
|
||||||
const char* sep = "";
|
{
|
||||||
for (std::string const& o : ccg.GetOutputs()) {
|
const char* sep = "";
|
||||||
std::string out = o;
|
for (std::string const& o : ccg.GetOutputs()) {
|
||||||
ConvertToWindowsSlash(out);
|
std::string out = o;
|
||||||
outputs << sep << out;
|
ConvertToWindowsSlash(out);
|
||||||
sep = ";";
|
outputs << sep << out;
|
||||||
|
sep = ";";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this->ProjectType == csproj) {
|
if (this->ProjectType == csproj) {
|
||||||
std::string name = "CustomCommand_" + c + "_" +
|
std::string name = "CustomCommand_" + c + "_" +
|
||||||
|
Reference in New Issue
Block a user