summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-20 14:23:45 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-20 14:23:45 -0500
commit909714cc23c0630e055b6835325641ad1e44d8a0 (patch)
treef97433817d1015801b418550f7bf4098be509d50
parent8b2839e41028211515ada624d06ebf78c5858472 (diff)
downloadcmake-2.4.4.tar.gz
ENH: fix from main treev2.4.4
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ff5b759e22..8dccb13388 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)
{