summaryrefslogtreecommitdiffstats
path: root/Source/cmCableCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCableCommand.cxx')
-rw-r--r--Source/cmCableCommand.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmCableCommand.cxx b/Source/cmCableCommand.cxx
index df6b6e3..3f4be4e 100644
--- a/Source/cmCableCommand.cxx
+++ b/Source/cmCableCommand.cxx
@@ -64,11 +64,18 @@ void cmCableCommand::SetupCableData()
if(m_CableData)
{ return; }
}
-
+
+ // We must make sure the output directory exists so that the CABLE
+ // configuration file can be opened by the cmCableData.
+ std::string pathName = m_Makefile->GetStartOutputDirectory();
+ if(!cmSystemTools::MakeDirectory(pathName.c_str()))
+ {
+ cmSystemTools::Error("Unable to make directory ", pathName.c_str());
+ }
+
// We didn't find another cmCableCommand with a valid cmCableData.
// We must allocate the new cmCableData ourselves, and with this
// command as its owner.
- std::string pathName = m_Makefile->GetStartOutputDirectory();
pathName += "/cable_config.xml";
m_CableData = new cmCableData(this, pathName);
}