From 0f24a667152c86982f7296b7df19f058c660d981 Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 3 Feb 2013 11:47:52 -0500 Subject: [PATCH] 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. --- Source/cmLocalVisualStudio6Generator.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 6c78ac47e..418eaa4d1 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/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