summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkDepends.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-04 21:34:25 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-04 21:34:25 (GMT)
commit3c5cf1bb8c4e146f3d3d177f2be9dc53869f5d74 (patch)
tree6705b688a2fcfe98ffaa27afba37b77244cdbf01 /Source/cmComputeLinkDepends.cxx
parentbf796f1434fd049ec77f7df5d4b8126b0d6ab96a (diff)
downloadCMake-3c5cf1bb8c4e146f3d3d177f2be9dc53869f5d74.zip
CMake-3c5cf1bb8c4e146f3d3d177f2be9dc53869f5d74.tar.gz
CMake-3c5cf1bb8c4e146f3d3d177f2be9dc53869f5d74.tar.bz2
ENH: Allow a custom list of debug configurations
Create a DEBUG_CONFIGURATIONS global property as a way for projects to specify which configuration names are considered to be 'debug' configurations.
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r--Source/cmComputeLinkDepends.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index cc60e09..7b768dc 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -188,6 +188,7 @@ cmComputeLinkDepends
// The configuration being linked.
this->Config = (config && *config)? config : 0;
+ this->LinkType = this->Target->ComputeLinkType(this->Config);
// Enable debug mode if requested.
this->DebugMode = this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE");
@@ -446,13 +447,6 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
std::vector<std::string> deplist;
cmSystemTools::ExpandListArgument(value, deplist);
- // Compute which library configuration to link.
- cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
- if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG")
- {
- linkType = cmTarget::DEBUG;
- }
-
// Look for entries meant for this configuration.
std::vector<std::string> actual_libs;
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
@@ -500,7 +494,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
}
// If the library is meant for this link type then use it.
- if(llt == cmTarget::GENERAL || llt == linkType)
+ if(llt == cmTarget::GENERAL || llt == this->LinkType)
{
actual_libs.push_back(*di);
}
@@ -524,19 +518,12 @@ void
cmComputeLinkDepends::AddTargetLinkEntries(int depender_index,
LinkLibraryVectorType const& libs)
{
- // Compute which library configuration to link.
- cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
- if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG")
- {
- linkType = cmTarget::DEBUG;
- }
-
// Look for entries meant for this configuration.
std::vector<std::string> actual_libs;
for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin();
li != libs.end(); ++li)
{
- if(li->second == cmTarget::GENERAL || li->second == linkType)
+ if(li->second == cmTarget::GENERAL || li->second == this->LinkType)
{
actual_libs.push_back(li->first);
}