Commit 0f87f32f authored by David Cole's avatar David Cole Committed by Kitware Robot
Browse files

Merge topic 'ninja-mingw-TARGET_PDB'

9e302891 Ninja: Cannot pass a reference to an anonymous object.
0a3d6a19 Ninja: make debug symbol suffix configurable by CMAKE_DEBUG_SYMBOL_SUFFIX
75bbffbe Ninja: make TARGET_PDB a real .gdb file name
e5a27a44 Ninja: line length
ae8124a0 Ninja: also mingw needs TARGET_PDB
parents a195ca98 9e302891
......@@ -174,7 +174,14 @@ cmNinjaNormalTargetGenerator
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.SONameFlag = "$SONAME_FLAG";
vars.TargetSOName = "$SONAME";
vars.TargetInstallNameDir = "$INSTALLNAME_DIR";
......@@ -423,7 +430,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
// TODO move to GetTargetPDB
cmMakefile* mf = this->GetMakefile();
if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
......@@ -434,6 +440,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
// It is common to place debug symbols at a specific place,
// so we need a plain target name in the rule available.
std::string prefix;
std::string base;
std::string suffix;
this->GetTarget()->GetFullNameComponents(prefix, base, suffix);
std::string dbg_suffix = ".dbg";
// TODO: Where to document?
if (mf->GetDefinition("CMAKE_DEBUG_SYMBOL_SUFFIX"))
dbg_suffix = mf->GetDefinition("CMAKE_DEBUG_SYMBOL_SUFFIX");
vars["TARGET_PDB"] = base + suffix + dbg_suffix;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment