Skip to content
Snippets Groups Projects
Commit 9977899d authored by Ben Boeckel's avatar Ben Boeckel Committed by Brad King
Browse files

Ninja: Fix RC language depfile generation with cmcldeps

In commit v3.7.0-rc1~275^2 (Ninja: Use full path for all source files,
2016-08-05), the source path was changed to use an absolute path.
Inside of `cmcldeps` for `.rc` file compilation, it uses a separate
argument for the path to the source file.  This ended up causing
`cmcldeps` to transform the following call:

    cmcldeps.exe RC source.rc ... C:/full/path/to/source.rc

into:

    ... C:/full/path/to//Tc source.rc

which is invalid.  Update the source filename to use the full path to
the source file so that the path is replaced properly.
parent b99bbfe8
No related branches found
No related tags found
No related merge requests found
......@@ -427,7 +427,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
: mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
cldeps = "\"";
cldeps += cmSystemTools::GetCMClDepsCommand();
cldeps += "\" " + lang + " $in \"$DEP_FILE\" $out \"";
cldeps += "\" " + lang + " " + vars.Source + " \"$DEP_FILE\" $out \"";
cldeps += mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX");
cldeps += "\" \"" + cl + "\" ";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment