Ninja: windows msvc: create for each target a .pdb file
This commit is contained in:
parent
a1a30340a2
commit
54bd175eea
@ -136,6 +136,7 @@ cmNinjaNormalTargetGenerator
|
|||||||
vars.Target = "$out";
|
vars.Target = "$out";
|
||||||
vars.TargetSOName = "$SONAME";
|
vars.TargetSOName = "$SONAME";
|
||||||
vars.TargetInstallNameDir = "$INSTALLNAME_DIR";
|
vars.TargetInstallNameDir = "$INSTALLNAME_DIR";
|
||||||
|
vars.TargetPDB = "$TARGET_PDB";
|
||||||
|
|
||||||
// Setup the target version.
|
// Setup the target version.
|
||||||
std::string targetVersionMajor;
|
std::string targetVersionMajor;
|
||||||
@ -361,6 +362,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
|||||||
targetOutputImplib.c_str(), cmLocalGenerator::SHELL);
|
targetOutputImplib.c_str(), cmLocalGenerator::SHELL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vars["TARGET_PDB"] = this->GetTargetPDB();
|
||||||
|
|
||||||
std::vector<cmCustomCommand> *cmdLists[3] = {
|
std::vector<cmCustomCommand> *cmdLists[3] = {
|
||||||
&this->GetTarget()->GetPreBuildCommands(),
|
&this->GetTarget()->GetPreBuildCommands(),
|
||||||
&this->GetTarget()->GetPreLinkCommands(),
|
&this->GetTarget()->GetPreLinkCommands(),
|
||||||
|
@ -270,6 +270,23 @@ std::string cmNinjaTargetGenerator::GetTargetName() const
|
|||||||
return this->Target->GetName();
|
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
|
void
|
||||||
cmNinjaTargetGenerator
|
cmNinjaTargetGenerator
|
||||||
::WriteLanguageRules(const std::string& language)
|
::WriteLanguageRules(const std::string& language)
|
||||||
@ -293,6 +310,7 @@ cmNinjaTargetGenerator
|
|||||||
vars.Object = "$out";
|
vars.Object = "$out";
|
||||||
std::string flags = "$FLAGS";
|
std::string flags = "$FLAGS";
|
||||||
vars.Defines = "$DEFINES";
|
vars.Defines = "$DEFINES";
|
||||||
|
vars.TargetPDB = "$TARGET_PDB";
|
||||||
|
|
||||||
std::string depfile;
|
std::string depfile;
|
||||||
std::string depfileFlagsName = "CMAKE_DEPFILE_FLAGS_" + language;
|
std::string depfileFlagsName = "CMAKE_DEPFILE_FLAGS_" + language;
|
||||||
@ -426,6 +444,7 @@ cmNinjaTargetGenerator
|
|||||||
cmNinjaVars vars;
|
cmNinjaVars vars;
|
||||||
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
|
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
|
||||||
vars["DEFINES"] = this->ComputeDefines(source, language);
|
vars["DEFINES"] = this->ComputeDefines(source, language);
|
||||||
|
vars["TARGET_PDB"] = this->GetTargetPDB();
|
||||||
|
|
||||||
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
|
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
|
||||||
comment,
|
comment,
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
|
|
||||||
virtual void Generate() = 0;
|
virtual void Generate() = 0;
|
||||||
|
|
||||||
|
std::string GetTargetPDB() const;
|
||||||
std::string GetTargetName() const;
|
std::string GetTargetName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user