[cmake-commits] king committed cmFindLibraryCommand.cxx 1.53 1.54
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jan 24 07:37:17 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6655/Source
Modified Files:
cmFindLibraryCommand.cxx
Log Message:
ENH: Apply new implicit link directory find_library policy when loading a cache from an earlier CMake.
Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- cmFindLibraryCommand.cxx 23 Jan 2008 22:53:18 -0000 1.53
+++ cmFindLibraryCommand.cxx 24 Jan 2008 12:37:15 -0000 1.54
@@ -86,6 +86,26 @@
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;
}
More information about the Cmake-commits
mailing list