diff --git a/Source/cmCableSourceFilesCommand.cxx b/Source/cmCableSourceFilesCommand.cxx index c4024f8eb..bdfb8c308 100644 --- a/Source/cmCableSourceFilesCommand.cxx +++ b/Source/cmCableSourceFilesCommand.cxx @@ -75,8 +75,6 @@ void cmCableSourceFilesCommand::WriteConfiguration() const std::ostream& os = m_CableData->GetOutputStream(); cmCableData::Indentation indent = m_CableData->GetIndentation(); - cmRegularExpression needCdataBlock("[&<>]"); - os << indent << "" << std::endl; for(Entries::const_iterator f = m_Entries.begin(); f != m_Entries.end(); ++f) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 996622253..3b2070cff 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -687,7 +687,7 @@ bool cmSystemTools::RunCommand(const char* command, fgets(buffer, BUFFER_SIZE, cpipe); while(!feof(cpipe)) { - std::cout << buffer; + std::cout << buffer << std::flush; output += buffer; fgets(buffer, BUFFER_SIZE, cpipe); } @@ -779,23 +779,23 @@ std::string cmSystemTools::FindLibrary(const char* name, tryPath = *p; tryPath += "/lib"; tryPath += name; - tryPath + ".so"; + tryPath += ".so"; if(cmSystemTools::FileExists(tryPath.c_str())) { return cmSystemTools::CollapseFullPath(tryPath.c_str()); } tryPath = *p; - tryPath = "/lib"; + tryPath += "/lib"; tryPath += name; - tryPath + ".a"; + tryPath += ".a"; if(cmSystemTools::FileExists(tryPath.c_str())) { return cmSystemTools::CollapseFullPath(tryPath.c_str()); } tryPath = *p; - tryPath = "/lib"; + tryPath += "/lib"; tryPath += name; - tryPath + ".sl"; + tryPath += ".sl"; if(cmSystemTools::FileExists(tryPath.c_str())) { return cmSystemTools::CollapseFullPath(tryPath.c_str()); @@ -886,7 +886,6 @@ void cmSystemTools::SplitProgramPath(const char* in_name, */ std::string cmSystemTools::CollapseFullPath(const char* in_name) { - std::cerr << "CollapseFullPath " << in_name << "\n"; std::string dir, file; cmSystemTools::SplitProgramPath(in_name, dir, file); // Ultra-hack warning: diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 680e2b7d3..ee68e569f 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -193,6 +193,7 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, } std::string librariesLinked; const cmTarget::LinkLibraries& libs = tgt.GetLinkLibraries(); + cmRegularExpression reg("lib(.*)(\\.so$|\\.a|\\.sl$)"); for(cmTarget::LinkLibraries::const_iterator lib = libs.begin(); lib != libs.end(); ++lib) { @@ -210,6 +211,10 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, linkLibs += cmSystemTools::EscapeSpaces(dir.c_str()); linkLibs += " "; librariesLinked += "-l"; + if(reg.find(file)) + { + file = reg.match(1); + } librariesLinked += file; librariesLinked += " "; }