Explanations of failing tests:
- The Plugin test is failing on Windows because the ENABLE_EXPORTS
target flag is not being processed:
Attached a patch which fixes this test. It was not an unprocessed flag
but a not existing directory.
I don't know where to commit this patch. stage/ninja-generator isn't
up to date any more, and I don't know if merging master is the right
way to proceed because it pollutes the history.
- I am not sure about the BuildDepend test and why it fails on both Mac,
Windows, and freebsd...
- all the bundle and framework tests fail on Mac because it is not
implemented.
Questions:
- Can we use master ninja for the windows dashboard now?
Still no respone file support.
- Does anyone know if the depend processing for windows has been or will
be accepted in ninja?
No, still nothing merged. It should pop up in this thread:
http://groups.google.com/group/ninja-build/browse_thread/thread/ad80094346ddfa1b
Peter
>From 838dc0b44ffaaa8c25e61e09ac44c9a337ab01f6 Mon Sep 17 00:00:00 2001
From: Peter Kuemmel <[email protected]>
Date: Fri, 6 Apr 2012 17:40:22 +0200
Subject: [PATCH 1/2] Ninja: ensure output directories exist
---
Source/cmNinjaNormalTargetGenerator.cxx | 28 ++++++++++++++++++++++------
Source/cmNinjaNormalTargetGenerator.h | 3 +++
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 2bad32c..2bfe814 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -47,8 +47,7 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
{
// 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());
+ EnsureDirectoryExists(target->GetDirectory(this->GetConfigName()));
}
}
@@ -56,6 +55,18 @@ cmNinjaNormalTargetGenerator::~cmNinjaNormalTargetGenerator()
{
}
+void cmNinjaNormalTargetGenerator::EnsureDirectoryExists(const std::string& dir)
+{
+ cmSystemTools::MakeDirectory(dir.c_str());
+}
+
+void cmNinjaNormalTargetGenerator::EnsureParentDirectoryExists(const std::string& path)
+{
+ EnsureDirectoryExists(cmSystemTools::GetParentDirectory(path.c_str()));
+}
+
+
+
void cmNinjaNormalTargetGenerator::Generate()
{
if (!this->TargetLinkLanguage) {
@@ -380,13 +391,18 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
}
+ std::string path;
if (!this->TargetNameImport.empty()) {
- vars["TARGET_IMPLIB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- targetOutputImplib.c_str(), cmLocalGenerator::SHELL);
+ path = this->GetLocalGenerator()->ConvertToOutputFormat(
+ targetOutputImplib.c_str(), cmLocalGenerator::SHELL);
+ vars["TARGET_IMPLIB"] = path;
+ EnsureParentDirectoryExists(path);
}
- vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
+ path = this->GetLocalGenerator()->ConvertToOutputFormat(
+ this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
+ vars["TARGET_PDB"] = path;
+ EnsureParentDirectoryExists(path);
std::vector<cmCustomCommand> *cmdLists[3] = {
&this->GetTarget()->GetPreBuildCommands(),
diff --git a/Source/cmNinjaNormalTargetGenerator.h b/Source/cmNinjaNormalTargetGenerator.h
index 1702caf..7acbe8f 100644
--- a/Source/cmNinjaNormalTargetGenerator.h
+++ b/Source/cmNinjaNormalTargetGenerator.h
@@ -35,6 +35,9 @@ private:
void WriteObjectLibStatement();
std::vector<std::string> ComputeLinkCmd();
+ void EnsureDirectoryExists(const std::string& dir);
+ void EnsureParentDirectoryExists(const std::string& path);
+
private:
// Target name info.
std::string TargetNameOut;
--
1.7.4.msysgit.0
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers