[Cmake-commits] CMake branch, next, updated. v2.8.8-3109-g003a4c4
Peter Kuemmel
syntheticpp at gmx.net
Mon Jun 11 22:18:37 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 003a4c4df76c0f44454776f4f0c9f91af10a41ec (commit)
via 38aa9e97f275e5a8a4054b58bd4f004fea8c1675 (commit)
from 2b8129de2a109a2c4666cbf681d73cc7eacf4976 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=003a4c4df76c0f44454776f4f0c9f91af10a41ec
commit 003a4c4df76c0f44454776f4f0c9f91af10a41ec
Merge: 2b8129d 38aa9e9
Author: Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Mon Jun 11 22:18:35 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 11 22:18:35 2012 -0400
Merge topic 'ninja-cldeps' into next
38aa9e9 Ninja: complete MinGW support
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38aa9e97f275e5a8a4054b58bd4f004fea8c1675
commit 38aa9e97f275e5a8a4054b58bd4f004fea8c1675
Author: Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Tue Jun 12 04:17:55 2012 +0200
Commit: Peter Kuemmel <syntheticpp at gmx.net>
CommitDate: Tue Jun 12 04:17:55 2012 +0200
Ninja: complete MinGW support
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index e377706..df1418f 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -179,16 +179,8 @@ cmNinjaNormalTargetGenerator
responseFlag += rspfile;
vars.Objects = responseFlag.c_str();
}
- std::string objdir =
- this->GetLocalGenerator()->GetHomeRelativeOutputPath();
- objdir += objdir.empty() ? "" : "/";
- objdir += cmake::GetCMakeFilesDirectoryPostSlash();
- objdir += this->GetTargetName();
- objdir += ".dir";
- objdir = this->GetLocalGenerator()->Convert(objdir.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
- vars.ObjectDir = objdir.c_str();
+
+ vars.ObjectDir = "$OBJECT_DIR";
vars.Target = "$out";
vars.SONameFlag = "$SONAME_FLAG";
vars.TargetSOName = "$SONAME";
@@ -433,10 +425,24 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
EnsureParentDirectoryExists(path);
}
- path = this->GetLocalGenerator()->ConvertToOutputFormat(
- this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
- vars["TARGET_PDB"] = path;
- EnsureParentDirectoryExists(path);
+ // TODO move to GetTargetPDB
+ cmMakefile* mf = this->GetMakefile();
+ if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
+ mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
+ {
+ path = this->GetTargetPDB();
+ vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
+ ConvertToNinjaPath(path.c_str()).c_str(),
+ cmLocalGenerator::SHELL);
+ EnsureParentDirectoryExists(path);
+ }
+
+ if (mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
+ {
+ path = GetTarget()->GetSupportDirectory();
+ vars["OBJECT_DIR"] = ConvertToNinjaPath(path.c_str());
+ EnsureDirectoryExists(path);
+ }
std::vector<cmCustomCommand> *cmdLists[3] = {
&this->GetTarget()->GetPreBuildCommands(),
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 02af738..0e859b3 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -301,7 +301,7 @@ std::string cmNinjaTargetGenerator::GetTargetPDB() const
targetFullPathPDB += this->Target->GetPDBName(this->GetConfigName());
}
- return ConvertToNinjaPath(targetFullPathPDB.c_str());
+ return targetFullPathPDB.c_str();
}
@@ -507,8 +507,16 @@ cmNinjaTargetGenerator
cmNinjaVars vars;
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
vars["DEFINES"] = this->ComputeDefines(source, language);
- vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
+
+ // TODO move to GetTargetPDB
+ cmMakefile* mf = this->GetMakefile();
+ if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
+ mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
+ {
+ vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
+ ConvertToNinjaPath(GetTargetPDB().c_str()).c_str(),
+ cmLocalGenerator::SHELL);
+ }
if(this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS"))
{
-----------------------------------------------------------------------
Summary of changes:
Source/cmNinjaNormalTargetGenerator.cxx | 34 ++++++++++++++++++------------
Source/cmNinjaTargetGenerator.cxx | 14 ++++++++++--
2 files changed, 31 insertions(+), 17 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list