summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kuemmel <syntheticpp@gmx.net>2012-02-21 20:18:05 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-02-21 20:18:05 (GMT)
commit54bd175eea66704a879fc72278cdbb49efdd801c (patch)
tree3c5c19e5b2a2e8f9bb33c32c7c8df235ebe48021 /Source/cmNinjaTargetGenerator.cxx
parenta1a30340a2eb0174f9f6911ee1e2cf4a36eaac96 (diff)
downloadCMake-54bd175eea66704a879fc72278cdbb49efdd801c.zip
CMake-54bd175eea66704a879fc72278cdbb49efdd801c.tar.gz
CMake-54bd175eea66704a879fc72278cdbb49efdd801c.tar.bz2
Ninja: windows msvc: create for each target a .pdb file
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 8a563b6..7b1c7d9 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -270,6 +270,23 @@ std::string cmNinjaTargetGenerator::GetTargetName() const
return this->Target->GetName();
}
+std::string cmNinjaTargetGenerator::GetTargetPDB() const
+{
+ std::string targetFullPathPDB;
+ if(this->Target->GetType() == cmTarget::EXECUTABLE ||
+ this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
+ this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ targetFullPathPDB = this->Target->GetDirectory(this->GetConfigName());
+ targetFullPathPDB += "/";
+ targetFullPathPDB += this->Target->GetPDBName(this->GetConfigName());
+ }
+
+ return ConvertToNinjaPath(targetFullPathPDB.c_str());
+}
+
+
void
cmNinjaTargetGenerator
::WriteLanguageRules(const std::string& language)
@@ -293,6 +310,7 @@ cmNinjaTargetGenerator
vars.Object = "$out";
std::string flags = "$FLAGS";
vars.Defines = "$DEFINES";
+ vars.TargetPDB = "$TARGET_PDB";
std::string depfile;
std::string depfileFlagsName = "CMAKE_DEPFILE_FLAGS_" + language;
@@ -426,6 +444,7 @@ cmNinjaTargetGenerator
cmNinjaVars vars;
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
vars["DEFINES"] = this->ComputeDefines(source, language);
+ vars["TARGET_PDB"] = this->GetTargetPDB();
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
comment,