From f1bb08f55b1ee0e8ae72d66289ad89ad27d75701 Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Thu, 23 Feb 2012 19:39:54 +0100 Subject: Ninja: ensure the output dir exists at compile time --- Source/cmNinjaNormalTargetGenerator.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 88f6f87..f4069c7 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/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() -- cgit v0.12