summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-20 18:57:12 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-20 18:57:12 (GMT)
commit28526006484459d3f47ac8c3e0ea03cf8f1d4d2f (patch)
tree35cfd659bdc73945855a41af108692bc610cff01 /Source
parenta5fc448bdadf0738bb0f82a6dd820ac94f9b0b91 (diff)
downloadCMake-28526006484459d3f47ac8c3e0ea03cf8f1d4d2f.zip
CMake-28526006484459d3f47ac8c3e0ea03cf8f1d4d2f.tar.gz
CMake-28526006484459d3f47ac8c3e0ea03cf8f1d4d2f.tar.bz2
ENH: fix for when a library is tagged both debug and optimized
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index fc6114e..54a778f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -954,11 +954,16 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
}
}
}
- // make sure the tpye is correct
+ // make sure the type is correct if it is currently
+ // general. So if you do a
+ // target_link_libraries(foo optimized bar) it will stay
+ // optimized and not use the lookup. As there maybe the
+ // case where someone has specifed that a library is both
+ // debug and optimized.
std::string linkType = lib;
linkType += "_LINK_TYPE";
const char* linkTypeString = this->GetDefinition( linkType.c_str() );
- if(linkTypeString)
+ if(llt == cmTarget::GENERAL && linkTypeString)
{
if(strcmp(linkTypeString, "debug") == 0)
{