summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAmitha Perera <perera@cs.rpi.edu>2001-06-12 18:15:22 (GMT)
committerAmitha Perera <perera@cs.rpi.edu>2001-06-12 18:15:22 (GMT)
commit918c8c4f3ae8bde5b0dd0733b633c68b4e8b3b7e (patch)
treeaf2e7560cd721e94de1f88752bc8787629da3fb9 /Source
parent583ac25e8fa4f17aa282837611624d20225a59e1 (diff)
downloadCMake-918c8c4f3ae8bde5b0dd0733b633c68b4e8b3b7e.zip
CMake-918c8c4f3ae8bde5b0dd0733b633c68b4e8b3b7e.tar.gz
CMake-918c8c4f3ae8bde5b0dd0733b633c68b4e8b3b7e.tar.bz2
BUG: SHLIB_LINK was being used when linking static executables. Missing comma
in RUNTIME_FLAG for IRIX. ENH: User supplied SHLIB_CFLAGS (-fPIC, etc) will override configure detected flags
Diffstat (limited to 'Source')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index fdeada0..cc9ae08 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -405,6 +405,8 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
if(outputRuntime && runtimeDirs.size()>0)
{
+ // For the runtime search directories, do a "-Wl,-rpath,a:b:c" or
+ // a "-R a -R b -R c" type link line
fout << runtimeFlag;
std::vector<std::string>::iterator itr = runtimeDirs.begin();
fout << *itr;
@@ -427,6 +429,8 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
void cmUnixMakefileGenerator::OutputTargets(std::ostream& fout)
{
+ bool dll = cmCacheManager::GetInstance()->IsOn("BUILD_SHARED_LIBS");
+
// for each target
const cmTargets &tgts = m_Makefile->GetTargets();
for(cmTargets::const_iterator l = tgts.begin();
@@ -459,8 +463,12 @@ void cmUnixMakefileGenerator::OutputTargets(std::ostream& fout)
{
fout << l->first << ": ${" <<
l->first << "_SRC_OBJS} ${CMAKE_DEPEND_LIBS}\n";
- fout << "\t${CMAKE_CXX_COMPILER} ${CMAKE_SHLIB_LINK_FLAGS} ${CMAKE_CXXFLAGS} ${" <<
- l->first << "_SRC_OBJS} ";
+ fout << "\t${CMAKE_CXX_COMPILER} ";
+ if (dll)
+ {
+ fout << "${CMAKE_SHLIB_LINK_FLAGS} ";
+ }
+ fout << "${CMAKE_CXXFLAGS} ${" << l->first << "_SRC_OBJS} ";
this->OutputLinkLibraries(fout, NULL,l->second);
fout << " -o " << l->first << "\n\n";
}