Commit 274ff520 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'cmcldeps-more-safety'

70e268da cmcldeps: prefer the /TC flag
47092d3e cmcldeps: append strings as strings
7db671a1 cmcldeps: search for single-byte strings as characters
parents 69be8239 70e268da
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment