summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kuemmel <syntheticpp@gmx.net>2012-06-12 02:17:55 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-06-12 02:17:55 (GMT)
commit38aa9e97f275e5a8a4054b58bd4f004fea8c1675 (patch)
tree36688b7b24134da5ed4a396f84ca6f9a03ef39cd /Source/cmNinjaTargetGenerator.cxx
parent7b91c3dfac88b2d01a8bac71e800032fcd03ec54 (diff)
downloadCMake-38aa9e97f275e5a8a4054b58bd4f004fea8c1675.zip
CMake-38aa9e97f275e5a8a4054b58bd4f004fea8c1675.tar.gz
CMake-38aa9e97f275e5a8a4054b58bd4f004fea8c1675.tar.bz2
Ninja: complete MinGW support
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx14
1 files changed, 11 insertions, 3 deletions
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"))
{