summaryrefslogtreecommitdiff
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 34350bf7a..04dab59d0 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -237,12 +237,14 @@ int main() {
// needed to suppress filename output of msvc tools
std::string srcfilename;
+ {
std::string::size_type pos = srcfile.rfind("\\");
if (pos == std::string::npos) {
srcfilename = srcfile;
} else {
srcfilename = srcfile.substr(pos + 1);
}
+ }
std::string nol = " /nologo ";
std::string show = " /showIncludes ";
@@ -266,10 +268,12 @@ int main() {
// call cl in object dir so the .i is generated there
std::string objdir;
+ {
std::string::size_type pos = objfile.rfind("\\");
if (pos != std::string::npos) {
objdir = objfile.substr(0, pos);
}
+ }
// extract dependencies with cl.exe
int exit_code = process(srcfilename, dfile, objfile,