浏览代码

ENH: configure file will assume start source dir if a full path is not provided

Ken Martin 20 年之前
父节点
当前提交
f3ed62b75a
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      Source/cmConfigureFileCommand.cxx

+ 8 - 1
Source/cmConfigureFileCommand.cxx

@@ -88,7 +88,14 @@ void cmConfigureFileCommand::FinalPass()
 
 int cmConfigureFileCommand::ConfigureFile()
 {
-  return m_Makefile->ConfigureFile(m_InputFile.c_str(),
+  std::string inFile = m_InputFile;
+  if (!cmSystemTools::FileIsFullPath(inFile.c_str()))
+    {
+    inFile = m_Makefile->GetStartDirectory();
+    inFile += "/";
+    inFile += m_InputFile;
+    }
+  return m_Makefile->ConfigureFile(inFile.c_str(),
     m_OuputFile.c_str(),
     m_CopyOnly,
     m_AtOnly,