BUG: don't report changed compiler variables if the path to the compiler
differs only e.g. a double slash somewhere instead only one slash as directory separator (#8890) Alex
This commit is contained in:
parent
f114e68f7a
commit
2ab4e7df81
|
@ -95,20 +95,28 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
std::string changeVars;
|
std::string changeVars;
|
||||||
if(cname && (path != cname) && (optional==false))
|
if(cname && (path != cname) && (optional==false))
|
||||||
{
|
{
|
||||||
const char* cvars =
|
std::string cnameString = cname;
|
||||||
this->GetCMakeInstance()->GetProperty(
|
std::string pathString = path;
|
||||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
// get rid of potentially multiple slashes:
|
||||||
if(cvars)
|
cmSystemTools::ConvertToUnixSlashes(cnameString);
|
||||||
{
|
cmSystemTools::ConvertToUnixSlashes(pathString);
|
||||||
changeVars += cvars;
|
if (cnameString != pathString)
|
||||||
|
{
|
||||||
|
const char* cvars =
|
||||||
|
this->GetCMakeInstance()->GetProperty(
|
||||||
|
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
||||||
|
if(cvars)
|
||||||
|
{
|
||||||
|
changeVars += cvars;
|
||||||
|
changeVars += ";";
|
||||||
|
}
|
||||||
|
changeVars += langComp;
|
||||||
changeVars += ";";
|
changeVars += ";";
|
||||||
|
changeVars += cname;
|
||||||
|
this->GetCMakeInstance()->SetProperty(
|
||||||
|
"__CMAKE_DELETE_CACHE_CHANGE_VARS_",
|
||||||
|
changeVars.c_str());
|
||||||
}
|
}
|
||||||
changeVars += langComp;
|
|
||||||
changeVars += ";";
|
|
||||||
changeVars += cname;
|
|
||||||
this->GetCMakeInstance()->SetProperty(
|
|
||||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_",
|
|
||||||
changeVars.c_str());
|
|
||||||
}
|
}
|
||||||
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
||||||
doc.c_str(), cmCacheManager::FILEPATH);
|
doc.c_str(), cmCacheManager::FILEPATH);
|
||||||
|
|
Loading…
Reference in New Issue