summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-06-08 19:44:30 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-06-08 19:44:30 (GMT)
commit45adc8e8c16127f9d12b5c59a37fb9eeb492cf74 (patch)
tree1f17daa34fe0c6e002d3599b54534a7cdb51709f /Source
parent0f939ee16478ad638bb380a75b4867b072a09306 (diff)
parent9d406cdb656740abcc03de8d655e57b4efe8c81b (diff)
downloadCMake-45adc8e8c16127f9d12b5c59a37fb9eeb492cf74.zip
CMake-45adc8e8c16127f9d12b5c59a37fb9eeb492cf74.tar.gz
CMake-45adc8e8c16127f9d12b5c59a37fb9eeb492cf74.tar.bz2
Merge topic 'fix_vs10_custom_command_rulefiles'
9d406cd Fix for bug #11927, external project git clone step always runs vs10.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6d2338e..2a4ff92 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -351,6 +351,9 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
{
if(!cmSystemTools::FileExists(sourcePath.c_str()))
{
+ // Make sure the path exists for the file
+ std::string path = cmSystemTools::GetFilenamePath(sourcePath);
+ cmSystemTools::MakeDirectory(path.c_str());
std::ofstream fout(sourcePath.c_str());
if(fout)
{
@@ -358,6 +361,14 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
fout.flush();
fout.close();
}
+ else
+ {
+ std::string error = "Could not create file: [";
+ error += sourcePath;
+ error += "] ";
+ cmSystemTools::Error
+ (error.c_str(), cmSystemTools::GetLastSystemError().c_str());
+ }
}
}
cmLocalVisualStudio7Generator* lg = this->LocalGenerator;