summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
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 );
}