summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index ce1aac2..f76bc0b 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -339,7 +339,7 @@ cmNinjaTargetGenerator
bool useClDeps = false;
std::string clDepsBinary;
std::string clShowPrefix;
- if (lang == "C" || lang == "CXX")
+ if (lang == "C" || lang == "CXX" || lang == "RC")
{
const char* depsPtr = mf->GetDefinition("CMAKE_CMCLDEPS_EXECUTABLE");
const char* showPtr = mf->GetDefinition("CMAKE_CL_SHOWINCLUDE_PREFIX");
@@ -352,8 +352,9 @@ cmNinjaTargetGenerator
if (projectName != "CMAKE_TRY_COMPILE")
{
useClDeps = true;
- clDepsBinary = depsPtr;
- clShowPrefix = showPtr;
+ std::string qu = "\"";
+ clDepsBinary = qu + depsPtr + qu;
+ clShowPrefix = qu + showPtr + qu;
vars.DependencyFile = "$DEP_FILE";
}
}
@@ -392,8 +393,10 @@ cmNinjaTargetGenerator
if(useClDeps)
{
- cmdLine = "\"" + clDepsBinary + "\" $in \"$DEP_FILE\" $out \""
- + clShowPrefix + "\" " + cmdLine;
+ std::string cl = mf->GetDefinition("CMAKE_C_COMPILER");
+ cl = "\"" + cl + "\" ";
+ cmdLine = clDepsBinary + " " + lang + " $in \"$DEP_FILE\" $out "
+ + clShowPrefix + " " + cl + cmdLine;
}
// Write the rule for compiling file of the given language.