diff options
author | Brad King <brad.king@kitware.com> | 2019-05-30 17:47:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-30 17:57:03 (GMT) |
commit | fcedf8e5528d711f1e4b765809da018d5adb2abd (patch) | |
tree | f2725258b29d9bc99ba5ffc41ca2d50bb363a75f /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | f872033d7531ed1d7d7345ff7873442ec8dbcee1 (diff) | |
download | CMake-fcedf8e5528d711f1e4b765809da018d5adb2abd.zip CMake-fcedf8e5528d711f1e4b765809da018d5adb2abd.tar.gz CMake-fcedf8e5528d711f1e4b765809da018d5adb2abd.tar.bz2 |
VS: Isolate custom command input/output generation scopes
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 7736e59..3f0d41d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1354,22 +1354,26 @@ 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; - if (lg->GetRealDependency(d, c, dep)) { - ConvertToWindowsSlash(dep); - inputs << ";" << dep; + { + inputs << source->GetFullPath(); + for (std::string const& d : ccg.GetDepends()) { + std::string dep; + if (lg->GetRealDependency(d, c, dep)) { + ConvertToWindowsSlash(dep); + inputs << ";" << dep; + } } } // output files for custom command std::stringstream outputs; - const char* sep = ""; - for (std::string const& o : ccg.GetOutputs()) { - std::string out = o; - ConvertToWindowsSlash(out); - outputs << sep << out; - sep = ";"; + { + const char* sep = ""; + for (std::string const& o : ccg.GetOutputs()) { + std::string out = o; + ConvertToWindowsSlash(out); + outputs << sep << out; + sep = ";"; + } } if (this->ProjectType == csproj) { std::string name = "CustomCommand_" + c + "_" + |