mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 12:40:06 +00:00
ENH: fix a bug with useing debuf optimized libs from other builds
This commit is contained in:
parent
197cbc529e
commit
786fdbc196
@ -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 );
|
i->second.AddLinkLibrary( *this, target, lib, llt );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -737,7 +737,9 @@ void cmTarget::Emit( const std::string& lib,
|
|||||||
{
|
{
|
||||||
// It's already been emitted
|
// It's already been emitted
|
||||||
if( emitted.find(lib) != emitted.end() )
|
if( emitted.find(lib) != emitted.end() )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Emit the dependencies only if this library node hasn't been
|
// Emit the dependencies only if this library node hasn't been
|
||||||
// visited before. If it has, then we have a cycle. The recursion
|
// visited before. If it has, then we have a cycle. The recursion
|
||||||
@ -797,7 +799,9 @@ void cmTarget::GatherDependencies( const cmMakefile& mf,
|
|||||||
// If the library is already in the dependency map, then it has
|
// If the library is already in the dependency map, then it has
|
||||||
// already been fully processed.
|
// already been fully processed.
|
||||||
if( dep_map.find(lib) != dep_map.end() )
|
if( dep_map.find(lib) != dep_map.end() )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const char* deps = mf.GetDefinition( (lib+"_LIB_DEPENDS").c_str() );
|
const char* deps = mf.GetDefinition( (lib+"_LIB_DEPENDS").c_str() );
|
||||||
if( deps && strcmp(deps,"") != 0 )
|
if( deps && strcmp(deps,"") != 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user