summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-05-02 23:09:12 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-05-02 23:09:12 (GMT)
commit0838265fdcd72c52f8d626157968b4db2b342c3e (patch)
tree33f25f86aa6df4d657ca4cbdd1ed869901b20b26 /Source/cmTarget.cxx
parent46e9d970e9d69376c4b20c1665bd59af46922e6d (diff)
downloadCMake-0838265fdcd72c52f8d626157968b4db2b342c3e.zip
CMake-0838265fdcd72c52f8d626157968b4db2b342c3e.tar.gz
CMake-0838265fdcd72c52f8d626157968b4db2b342c3e.tar.bz2
check for optimized or debug library adds
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1f5387d..d3f2726 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -343,8 +343,23 @@ void cmTarget::GatherDependencies( const cmMakefile& mf,
std::string l = depline.substr( start, end-start );
if( l.size() != 0 )
{
- const std::string cname = l;
- lib_map[ cname ] = std::make_pair(l,GENERAL); // ** FIXME: we need to store the correct type here
+ const std::string cname = l;
+ std::string linkType = l;
+ linkType += "_LINK_TYPE";
+ cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
+ const char* linkTypeString = mf.GetDefinition( linkType.c_str() );
+ if(linkTypeString)
+ {
+ if(strcmp(linkTypeString, "debug") == 0)
+ {
+ llt = cmTarget::DEBUG;
+ }
+ if(strcmp(linkTypeString, "optimized") == 0)
+ {
+ llt = cmTarget::OPTIMIZED;
+ }
+ }
+ lib_map[ cname ] = std::make_pair(l,llt);
dep_map[ lib ].insert( cname );
GatherDependencies( mf, cname, dep_map, lib_map );
}