diff options
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r-- | Source/cmcldeps.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 167d60a..b86ad6e 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -205,7 +205,7 @@ static int process(const std::string& srcfilename, const std::string& dfile, std::vector<std::string> command; for (std::vector<std::string>::iterator i = args.begin(); i != args.end(); ++i) { - command.push_back(i->c_str()); + command.push_back(*i); } // run the command int exit_code = 0; @@ -258,7 +258,7 @@ int main() // needed to suppress filename output of msvc tools std::string srcfilename; { - std::string::size_type pos = srcfile.rfind("\\"); + std::string::size_type pos = srcfile.rfind('\\'); if (pos == std::string::npos) { srcfilename = srcfile; } else { @@ -279,12 +279,7 @@ int main() clrest = replace(clrest, "/fo", "/out:"); clrest = replace(clrest, objfile, objfile + ".dep.obj "); - // rc: src\x\x.rc -> cl: /Tc src\x\x.rc - if (srcfile.find(" ") != std::string::npos) - srcfile = "\"" + srcfile + "\""; - clrest = replace(clrest, srcfile, "/Tc " + srcfile); - - cl = "\"" + cl + "\" /P /DRC_INVOKED "; + cl = "\"" + cl + "\" /P /DRC_INVOKED /TC "; // call cl in object dir so the .i is generated there std::string objdir; |