Browse Source

ENH: CABLE config file (config_cable.xml) should now be opened in the output directory.

Brad King 25 years ago
parent
commit
b6d1cda20e
3 changed files with 7 additions and 4 deletions
  1. 3 1
      Source/cmCableCommand.cxx
  2. 3 2
      Source/cmCableData.cxx
  3. 1 1
      Source/cmCableData.h

+ 3 - 1
Source/cmCableCommand.cxx

@@ -68,5 +68,7 @@ void cmCableCommand::SetupCableData()
   // We didn't find another cmCableCommand with a valid cmCableData.
   // We must allocate the new cmCableData ourselves, and with this
   // command as its owner.
-  m_CableData = new cmCableData(this);
+  std::string pathName = m_Makefile->GetStartOutputDirectory();
+  pathName += "/cable_config.xml";
+  m_CableData = new cmCableData(this, pathName);
 }

+ 3 - 2
Source/cmCableData.cxx

@@ -22,13 +22,14 @@
  * The cmCableData instance is owned by one cmCableCommand, which is given
  * to this constructor.
  */
-cmCableData::cmCableData(const cmCableCommand* owner):
+cmCableData::cmCableData(const cmCableCommand* owner,
+                         const std::string& configurationFile):
   m_Owner(owner),
   m_Indentation(0),
   m_Package(NULL),
   m_PackageNamespaceDepth(0)
 {
-  this->OpenOutputFile("cable_config.xml");
+  this->OpenOutputFile(configurationFile);
 }
 
 

+ 1 - 1
Source/cmCableData.h

@@ -28,7 +28,7 @@ class cmCablePackageCommand;
 class cmCableData
 {
 public:
-  cmCableData(const cmCableCommand*);
+  cmCableData(const cmCableCommand*, const std::string&);
   ~cmCableData();
   
   /**