[cmake-commits] king committed cmExportFileGenerator.cxx 1.3 1.4 cmExportFileGenerator.h 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 28 13:38:01 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17316/Source

Modified Files:
	cmExportFileGenerator.cxx cmExportFileGenerator.h 
Log Message:
BUG: Fix export/import file generation to not store link dependencies of executables or modules.


Index: cmExportFileGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportFileGenerator.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmExportFileGenerator.h	28 Jan 2008 18:21:42 -0000	1.3
+++ cmExportFileGenerator.h	28 Jan 2008 18:37:59 -0000	1.4
@@ -67,6 +67,9 @@
   void SetImportDetailProperties(const char* config,
                                  std::string const& suffix, cmTarget* target,
                                  ImportPropertyMap& properties);
+  void SetImportLinkProperties(const char* config,
+                               std::string const& suffix, cmTarget* target,
+                               ImportPropertyMap& properties);
 
   /** Each subclass knows how to generate its kind of export file.  */
   virtual bool GenerateMainFile(std::ostream& os) = 0;

Index: cmExportFileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportFileGenerator.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmExportFileGenerator.cxx	28 Jan 2008 18:21:42 -0000	1.3
+++ cmExportFileGenerator.cxx	28 Jan 2008 18:37:59 -0000	1.4
@@ -135,7 +135,22 @@
     }
 
   // Add the transitive link dependencies for this configuration.
-  {
+  if(target->GetType() == cmTarget::STATIC_LIBRARY ||
+     target->GetType() == cmTarget::SHARED_LIBRARY)
+    {
+    this->SetImportLinkProperties(config, suffix, target, properties);
+    }
+}
+
+//----------------------------------------------------------------------------
+void
+cmExportFileGenerator
+::SetImportLinkProperties(const char* config, std::string const& suffix,
+                          cmTarget* target, ImportPropertyMap& properties)
+{
+  // Get the makefile in which to lookup target information.
+  cmMakefile* mf = target->GetMakefile();
+
   // Compute which library configuration to link.
   cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
   if(config && cmSystemTools::UpperCase(config) == "DEBUG")
@@ -193,7 +208,6 @@
   std::string prop = "IMPORTED_LINK_LIBRARIES";
   prop += suffix;
   properties[prop] = link_libs;
-  }
 }
 
 //----------------------------------------------------------------------------



More information about the Cmake-commits mailing list