summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-30 17:47:26 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-30 17:57:03 (GMT)
commitfcedf8e5528d711f1e4b765809da018d5adb2abd (patch)
treef2725258b29d9bc99ba5ffc41ca2d50bb363a75f /Source/cmVisualStudio10TargetGenerator.cxx
parentf872033d7531ed1d7d7345ff7873442ec8dbcee1 (diff)
downloadCMake-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.cxx28
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 + "_" +