Ninja: ensure the output dir exists at compile time

This commit is contained in:
Peter Kuemmel 2012-02-23 19:39:54 +01:00 committed by David Cole
parent 7a6b5f4651
commit f1bb08f55b
1 changed files with 5 additions and 0 deletions

View File

@ -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()