Ninja: cmcldeps needs a compiler
This commit is contained in:
parent
186e9bdc22
commit
3632f24f13
|
@ -354,7 +354,9 @@ cmNinjaTargetGenerator
|
||||||
// TODO but why doesn't it work with cmcldeps?
|
// TODO but why doesn't it work with cmcldeps?
|
||||||
const std::string projectName = mf->GetProjectName() ?
|
const std::string projectName = mf->GetProjectName() ?
|
||||||
mf->GetProjectName() : "";
|
mf->GetProjectName() : "";
|
||||||
if (projectName != "CMAKE_TRY_COMPILE")
|
if (projectName != "CMAKE_TRY_COMPILE"
|
||||||
|
&& (mf->GetDefinition("CMAKE_C_COMPILER") ||
|
||||||
|
mf->GetDefinition("CMAKE_CXX_COMPILER")))
|
||||||
{
|
{
|
||||||
useClDeps = true;
|
useClDeps = true;
|
||||||
std::string qu = "\"";
|
std::string qu = "\"";
|
||||||
|
@ -399,9 +401,10 @@ cmNinjaTargetGenerator
|
||||||
if(useClDeps)
|
if(useClDeps)
|
||||||
{
|
{
|
||||||
std::string cl = mf->GetDefinition("CMAKE_C_COMPILER");
|
std::string cl = mf->GetDefinition("CMAKE_C_COMPILER");
|
||||||
cl = "\"" + cl + "\" ";
|
if (cl.empty())
|
||||||
|
cl = mf->GetDefinition("CMAKE_CXX_COMPILER");
|
||||||
cmdLine = clDepsBinary + " " + lang + " $in \"$DEP_FILE\" $out "
|
cmdLine = clDepsBinary + " " + lang + " $in \"$DEP_FILE\" $out "
|
||||||
+ clShowPrefix + " " + cl + cmdLine;
|
+ clShowPrefix + " \"" + cl + "\" " + cmdLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the rule for compiling file of the given language.
|
// Write the rule for compiling file of the given language.
|
||||||
|
|
Loading…
Reference in New Issue