Переглянути джерело

VS 6: Create .rule file directory before file

The VS 6 IDE wants .rule files to exist in order to run the rule attached
to it.  When creating the dummy .rule file make sure the directory exists.
Brad King 13 роки тому
батько
коміт
0f24a66715
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      Source/cmLocalVisualStudio6Generator.cxx

+ 3 - 0
Source/cmLocalVisualStudio6Generator.cxx

@@ -325,6 +325,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
       if(!cmSystemTools::FileExists(source.c_str()))
         {
         cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
+        // Make sure the path exists for the file
+        std::string path = cmSystemTools::GetFilenamePath(source);
+        cmSystemTools::MakeDirectory(path.c_str());
 #if defined(_WIN32) || defined(__CYGWIN__)
         std::ofstream sourceFout(source.c_str(),
                            std::ios::binary | std::ios::out