fix for debug libs on UNIX
This commit is contained in:
parent
867f88a93f
commit
333562e8cc
@ -498,6 +498,9 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
|||||||
std::string runtimeSep;
|
std::string runtimeSep;
|
||||||
std::vector<std::string> runtimeDirs;
|
std::vector<std::string> runtimeDirs;
|
||||||
|
|
||||||
|
std::string buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||||
|
buildType = cmSystemTools::UpperCase(buildType);
|
||||||
|
|
||||||
bool cxx = tgt.HasCxx();
|
bool cxx = tgt.HasCxx();
|
||||||
if(!cxx )
|
if(!cxx )
|
||||||
{
|
{
|
||||||
@ -577,8 +580,15 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
|||||||
{
|
{
|
||||||
// Don't link the library against itself!
|
// Don't link the library against itself!
|
||||||
if(targetLibrary && (lib->first == targetLibrary)) continue;
|
if(targetLibrary && (lib->first == targetLibrary)) continue;
|
||||||
// don't look at debug libraries
|
// use the correct lib for the current configuration
|
||||||
if (lib->second == cmTarget::DEBUG) continue;
|
if (lib->second == cmTarget::DEBUG && buildType != "DEBUG")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (lib->second == cmTarget::OPTIMIZED && buildType == "DEBUG")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// skip zero size library entries, this may happen
|
// skip zero size library entries, this may happen
|
||||||
// if a variable expands to nothing.
|
// if a variable expands to nothing.
|
||||||
if (lib->first.size() == 0) continue;
|
if (lib->first.size() == 0) continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user