From b4aac0caca76c7d2041556785799b5ea1bbf1ce7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 21 Feb 2014 09:25:30 -0500 Subject: [PATCH] Makefile: Fix per-config linker PDB output directory Also, now that all call sites of cmTarget::GetPDBName and cmTarget::GetPDBDirectory pass the configuration, make the argument non-optional. --- Source/cmMakefileExecutableTargetGenerator.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 2 +- Source/cmTarget.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 69b8092a0..664d73e87 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -129,7 +129,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) } } - std::string pdbOutputPath = this->Target->GetPDBDirectory(); + std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName); cmSystemTools::MakeDirectory(pdbOutputPath.c_str()); pdbOutputPath += "/"; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index d6a0cd4b2..b9af63815 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -321,7 +321,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules } } - std::string pdbOutputPath = this->Target->GetPDBDirectory(); + std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName); cmSystemTools::MakeDirectory(pdbOutputPath.c_str()); pdbOutputPath += "/"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 271824ba9..599e85d88 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -340,7 +340,7 @@ public: If the configuration name is given then the generator will add its subdirectory for that configuration. Otherwise just the canonical pdb output directory is given. */ - std::string GetPDBDirectory(const char* config = 0) const; + std::string GetPDBDirectory(const char* config) const; /** Get the location of the target in the build tree for the given configuration. This location is suitable for use as the LOCATION @@ -375,7 +375,7 @@ public: const char* config=0, bool implib = false) const; /** Get the name of the pdb file for the target. */ - std::string GetPDBName(const char* config=0) const; + std::string GetPDBName(const char* config) const; /** Whether this library has soname enabled and platform supports it. */ bool HasSOName(const char* config) const;