Browse Source

Ninja: ensure the output dir exists at compile time

Peter Kuemmel 13 years ago
parent
commit
f1bb08f55b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Source/cmNinjaNormalTargetGenerator.cxx

+ 5 - 0
Source/cmNinjaNormalTargetGenerator.cxx

@@ -42,6 +42,11 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
                             this->TargetNameImport,
                             this->TargetNamePDB,
                             GetLocalGenerator()->GetConfigName());
+
+  // on Windows the output dir is already needed at compile time
+  // ensure the directory exists (OutDir test)
+  std::string outpath = target->GetDirectory(this->GetConfigName());
+  cmSystemTools::MakeDirectory(outpath.c_str());
 }
 
 cmNinjaNormalTargetGenerator::~cmNinjaNormalTargetGenerator()