[Cmake-commits] [cmake-commits] king committed cmExportInstallFileGenerator.cxx 1.8 1.9 cmExportInstallFileGenerator.h 1.2 1.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jan 7 14:16:30 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv3675/Source
Modified Files:
cmExportInstallFileGenerator.cxx
cmExportInstallFileGenerator.h
Log Message:
ENH: Refactor computation of import file glob
New method cmExportInstallFileGenerator::GetConfigImportFileGlob
computes the globbing expression that an installed export file uses to
load its per-configuration support files.
Index: cmExportInstallFileGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportInstallFileGenerator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmExportInstallFileGenerator.h 1 Feb 2008 13:56:00 -0000 1.2
--- cmExportInstallFileGenerator.h 7 Jan 2009 19:16:28 -0000 1.3
***************
*** 60,63 ****
--- 60,67 ----
std::map<cmStdString, cmStdString> const& GetConfigImportFiles()
{ return this->ConfigImportFiles; }
+
+ /** Compute the globbing expression used to load per-config import
+ files from the main file. */
+ std::string GetConfigImportFileGlob();
protected:
Index: cmExportInstallFileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportInstallFileGenerator.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmExportInstallFileGenerator.cxx 6 Feb 2008 19:20:35 -0000 1.8
--- cmExportInstallFileGenerator.cxx 7 Jan 2009 19:16:28 -0000 1.9
***************
*** 29,32 ****
--- 29,41 ----
//----------------------------------------------------------------------------
+ std::string cmExportInstallFileGenerator::GetConfigImportFileGlob()
+ {
+ std::string glob = this->FileBase;
+ glob += "-*";
+ glob += this->FileExt;
+ return glob;
+ }
+
+ //----------------------------------------------------------------------------
bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
{
***************
*** 56,60 ****
<< "GET_FILENAME_COMPONENT(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"
<< "FILE(GLOB CONFIG_FILES \"${_DIR}/"
! << this->FileBase << "-*" << this->FileExt << "\")\n"
<< "FOREACH(f ${CONFIG_FILES})\n"
<< " INCLUDE(${f})\n"
--- 65,69 ----
<< "GET_FILENAME_COMPONENT(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"
<< "FILE(GLOB CONFIG_FILES \"${_DIR}/"
! << this->GetConfigImportFileGlob() << "\")\n"
<< "FOREACH(f ${CONFIG_FILES})\n"
<< " INCLUDE(${f})\n"
More information about the Cmake-commits
mailing list