cmcldeps: prefer the /TC flag

The /TC flag causes all source files to be processed as C source files.
We know that there is only one, so this is safe.
This commit is contained in:
Ben Boeckel
2016-10-13 12:48:37 -04:00
parent 47092d3e80
commit 70e268da3e
+1 -6
View File
@@ -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;