From 938e6e487b838fc844249b49f1b5860a91683649 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 11 Mar 2002 08:11:26 -0500 Subject: [PATCH] BUG: make sure libraries do not depend on themselves --- Source/cmMSDotNETGenerator.cxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx index fad881707..998c3a6a9 100644 --- a/Source/cmMSDotNETGenerator.cxx +++ b/Source/cmMSDotNETGenerator.cxx @@ -936,18 +936,21 @@ void cmMSDotNETGenerator::OutputLibraries(std::ostream& fout, cmTarget::LinkLibraries::const_iterator j; for(j = libs.begin(); j != libs.end(); ++j) { - std::string lib = j->first; - if(j->first.find(".lib") == std::string::npos) + if(j->first != libName) { - lib += ".lib"; + std::string lib = j->first; + if(j->first.find(".lib") == std::string::npos) + { + lib += ".lib"; + } + lib = this->ConvertToXMLOutputPath(lib.c_str()); + if (j->second == cmTarget::GENERAL + || (j->second == cmTarget::DEBUG && strcmp(configName, "DEBUG") == 0) + || (j->second == cmTarget::OPTIMIZED && strcmp(configName, "DEBUG") != 0)) + { + fout << lib << " "; + } } - lib = this->ConvertToXMLOutputPath(lib.c_str()); - if (j->second == cmTarget::GENERAL - || (j->second == cmTarget::DEBUG && strcmp(configName, "DEBUG") == 0) - || (j->second == cmTarget::OPTIMIZED && strcmp(configName, "DEBUG") != 0)) - { - fout << lib << " "; - } } }