Ninja: make TARGET_PDB a real .gdb file name
This commit is contained in:
parent
e5a27a44a7
commit
75bbffbe1b
|
@ -174,7 +174,14 @@ cmNinjaNormalTargetGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.ObjectDir = "$OBJECT_DIR";
|
vars.ObjectDir = "$OBJECT_DIR";
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// Makefile generator expands <TARGET> to the plain target name
|
||||||
|
// with suffix. $out expands to a relative path. This difference
|
||||||
|
// could make trouble when switching to Ninja generator. Maybe
|
||||||
|
// using TARGET_NAME and RuleVariables::TargetName is a fix.
|
||||||
vars.Target = "$out";
|
vars.Target = "$out";
|
||||||
|
|
||||||
vars.SONameFlag = "$SONAME_FLAG";
|
vars.SONameFlag = "$SONAME_FLAG";
|
||||||
vars.TargetSOName = "$SONAME";
|
vars.TargetSOName = "$SONAME";
|
||||||
vars.TargetInstallNameDir = "$INSTALLNAME_DIR";
|
vars.TargetInstallNameDir = "$INSTALLNAME_DIR";
|
||||||
|
@ -423,7 +430,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
EnsureParentDirectoryExists(path);
|
EnsureParentDirectoryExists(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO move to GetTargetPDB
|
|
||||||
cmMakefile* mf = this->GetMakefile();
|
cmMakefile* mf = this->GetMakefile();
|
||||||
if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
|
if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
|
||||||
mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
|
mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
|
||||||
|
@ -438,10 +444,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
{
|
{
|
||||||
// It is common to place debug symbols at a specific place,
|
// It is common to place debug symbols at a specific place,
|
||||||
// so we need a plain target name in the rule available.
|
// so we need a plain target name in the rule available.
|
||||||
// TODO: Makefile generator could use <TARGET> because it expands
|
std::string base;
|
||||||
// to the plain target name, here it expands to a relative path.
|
std::string suffix;
|
||||||
// This difference could make trouble when switching to Ninja generator.
|
this->GetTarget()->GetFullNameComponents(std::string(), base, suffix);
|
||||||
vars["TARGET_PDB"] = std::string(this->GetTarget()->GetName());
|
vars["TARGET_PDB"] = base + suffix + ".gdb";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
|
if (mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
|
||||||
|
|
Loading…
Reference in New Issue