Commit 3a462fa6 authored by Brad King's avatar Brad King
Browse files

ENH: Apply new implicit link directory find_library policy when loading a...

ENH: Apply new implicit link directory find_library policy when loading a cache from an earlier CMake.
parent 72134082
......@@ -86,6 +86,26 @@ bool cmFindLibraryCommand
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
}
// If the existing value was loaded from a cache written by CMake
// 2.4 or below then force the implicit link directory fix on the
// value.
if(this->Makefile->NeedCacheCompatibility(2, 4))
{
if(const char* v =
this->Makefile->GetDefinition(this->VariableName.c_str()))
{
std::string nv = this->FixForImplicitLocations(v);
if(nv != v)
{
this->Makefile
->AddCacheDefinition(this->VariableName.c_str(),
nv.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
}
}
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment