Ninja: path is already declared
This commit is contained in:
parent
6547f369e4
commit
c864103748
|
@ -479,22 +479,22 @@ void cmGlobalNinjaGenerator
|
||||||
std::string windres = cmSystemTools::FindProgram("windres");
|
std::string windres = cmSystemTools::FindProgram("windres");
|
||||||
if(windres.empty())
|
if(windres.empty())
|
||||||
{
|
{
|
||||||
std::string path;
|
std::string compiler_path;
|
||||||
std::string::size_type prefix = std::string::npos;
|
std::string::size_type prefix = std::string::npos;
|
||||||
if (mf->GetDefinition("CMAKE_C_COMPILER"))
|
if (mf->GetDefinition("CMAKE_C_COMPILER"))
|
||||||
{
|
{
|
||||||
path = mf->GetDefinition("CMAKE_C_COMPILER");
|
compiler_path = mf->GetDefinition("CMAKE_C_COMPILER");
|
||||||
prefix = path.rfind("gcc");
|
prefix = compiler_path.rfind("gcc");
|
||||||
}
|
}
|
||||||
else if (mf->GetDefinition("CMAKE_CXX_COMPILER"))
|
else if (mf->GetDefinition("CMAKE_CXX_COMPILER"))
|
||||||
{
|
{
|
||||||
path = mf->GetDefinition("CMAKE_CXX_COMPILER");
|
compiler_path = mf->GetDefinition("CMAKE_CXX_COMPILER");
|
||||||
prefix = path.rfind("++");
|
prefix = compiler_path.rfind("++");
|
||||||
prefix--;
|
prefix--;
|
||||||
}
|
}
|
||||||
if (prefix != std::string::npos)
|
if (prefix != std::string::npos)
|
||||||
{
|
{
|
||||||
windres = path.substr(0, prefix) + "windres";
|
windres = compiler_path.substr(0, prefix) + "windres";
|
||||||
windres = cmSystemTools::FindProgram(windres.c_str());
|
windres = cmSystemTools::FindProgram(windres.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue