summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-11 18:39:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-11 18:39:30 (GMT)
commit72a9a5546f7fa4ab09c6db6208faf8bcdea81730 (patch)
tree7c098b7c769de3931fbc7ed23950611239e9c867 /Source
parent1a2af3f58318d6cf76260493e9db2f0df9d17ba7 (diff)
downloadCMake-72a9a5546f7fa4ab09c6db6208faf8bcdea81730.zip
CMake-72a9a5546f7fa4ab09c6db6208faf8bcdea81730.tar.gz
CMake-72a9a5546f7fa4ab09c6db6208faf8bcdea81730.tar.bz2
BUG: fix find library for unix
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCableSourceFilesCommand.cxx2
-rw-r--r--Source/cmSystemTools.cxx13
-rw-r--r--Source/cmUnixMakefileGenerator.cxx5
3 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmCableSourceFilesCommand.cxx b/Source/cmCableSourceFilesCommand.cxx
index c4024f8..bdfb8c3 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 << "<Headers>" << 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 9966222..3b2070c 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 680e2b7..ee68e56 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 += " ";
}