diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-11-16 15:57:00 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-11-16 15:57:00 (GMT) |
commit | 786fdbc196e6fa829472d9d8e9545ac837758242 (patch) | |
tree | bf4d0d3108f2b104620766c1e58b303f98ebbabb /Source/cmMakefile.cxx | |
parent | 197cbc529eab056ab79cc0551f1ab62aee95e619 (diff) | |
download | CMake-786fdbc196e6fa829472d9d8e9545ac837758242.zip CMake-786fdbc196e6fa829472d9d8e9545ac837758242.tar.gz CMake-786fdbc196e6fa829472d9d8e9545ac837758242.tar.bz2 |
ENH: fix a bug with useing debuf optimized libs from other builds
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 88f55dd..0a1a4dc 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -954,6 +954,21 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target, } } } + // make sure the tpye is correct + std::string linkType = lib; + linkType += "_LINK_TYPE"; + const char* linkTypeString = this->GetDefinition( linkType.c_str() ); + if(linkTypeString) + { + if(strcmp(linkTypeString, "debug") == 0) + { + llt = cmTarget::DEBUG; + } + if(strcmp(linkTypeString, "optimized") == 0) + { + llt = cmTarget::OPTIMIZED; + } + } i->second.AddLinkLibrary( *this, target, lib, llt ); } else |