summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-03 16:47:52 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-03 17:03:14 (GMT)
commit0f24a667152c86982f7296b7df19f058c660d981 (patch)
treec079ecf7b1244ad6e04aaea39300cc9c3f05a5d4 /Source
parent21fc6c46df7f2271d7baace04f239f031785b917 (diff)
downloadCMake-0f24a667152c86982f7296b7df19f058c660d981.zip
CMake-0f24a667152c86982f7296b7df19f058c660d981.tar.gz
CMake-0f24a667152c86982f7296b7df19f058c660d981.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6c78ac4..418eaa4 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