summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-06 16:20:50 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-06 16:20:50 (GMT)
commit719438fc27ab4052267d2b8a3ad955ca6b06fa63 (patch)
tree6669cecb21f630b6193412fa6ef215a23c411a70 /Source
parentc36622a45f55b296d0891d94a91372c320768be0 (diff)
parentf3093668739ab21e92f6eddbf9227bbe29fbb2a4 (diff)
downloadCMake-719438fc27ab4052267d2b8a3ad955ca6b06fa63.zip
CMake-719438fc27ab4052267d2b8a3ad955ca6b06fa63.tar.gz
CMake-719438fc27ab4052267d2b8a3ad955ca6b06fa63.tar.bz2
Merge branch 'pdb-default-outdir' into release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/cmTarget.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 423b350..f3eb52b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2584,7 +2584,10 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
OutputInfo info;
this->ComputeOutputDir(config, false, info.OutDir);
this->ComputeOutputDir(config, true, info.ImpDir);
- this->ComputePDBOutputDir(config, info.PdbDir);
+ if(!this->ComputePDBOutputDir(config, info.PdbDir))
+ {
+ info.PdbDir = info.OutDir;
+ }
OutputInfoMapType::value_type entry(config_upper, info);
i = this->Internal->OutputInfoMap.insert(entry).first;
}
@@ -3940,7 +3943,7 @@ bool cmTarget::ComputeOutputDir(const char* config,
}
//----------------------------------------------------------------------------
-void cmTarget::ComputePDBOutputDir(const char* config, std::string& out)
+bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out)
{
// Look for a target property defining the target output directory
// based on the target type.
@@ -3980,8 +3983,7 @@ void cmTarget::ComputePDBOutputDir(const char* config, std::string& out)
}
if(out.empty())
{
- // Default to the current output directory.
- out = ".";
+ return false;
}
// Convert the output path to a full path in case it is
@@ -3996,6 +3998,7 @@ void cmTarget::ComputePDBOutputDir(const char* config, std::string& out)
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
AppendDirectoryForConfig("/", config, "", out);
}
+ return true;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 558bfab..e442d25 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -577,7 +577,7 @@ private:
struct OutputInfo;
OutputInfo const* GetOutputInfo(const char* config);
bool ComputeOutputDir(const char* config, bool implib, std::string& out);
- void ComputePDBOutputDir(const char* config, std::string& out);
+ bool ComputePDBOutputDir(const char* config, std::string& out);
// Cache import information from properties for each configuration.
struct ImportInfo;