mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
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:
+1
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user