[cmake-commits] king committed cmComputeLinkInformation.cxx 1.3 1.4
cmComputeLinkInformation.h 1.2 1.3 cmDocumentVariables.cxx 1.10
1.11 cmLocalGenerator.cxx 1.259 1.260
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jan 23 13:30:57 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27699/Source
Modified Files:
cmComputeLinkInformation.cxx cmComputeLinkInformation.h
cmDocumentVariables.cxx cmLocalGenerator.cxx
Log Message:
BUG: Fix generation of Watcom link lines.
- Work-around bug in Watcom command line parsing for spaces in paths.
- Add 'library' option before libraries specified by file path.
Index: cmDocumentVariables.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentVariables.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmDocumentVariables.cxx 22 Jan 2008 14:13:03 -0000 1.10
+++ cmDocumentVariables.cxx 23 Jan 2008 18:30:55 -0000 1.11
@@ -778,6 +778,12 @@
"On most compilers this is \"-l\".",false,
"Variables that Control the Build");
cm->DefineProperty
+ ("CMAKE_LINK_LIBRARY_FILE_FLAG", cmProperty::VARIABLE,
+ "Flag used to link a library specified by a path to its file.",
+ "The flag used before a library file path is given to the linker. "
+ "This is needed only on very few platforms.", false,
+ "Variables that Control the Build");
+ cm->DefineProperty
("CMAKE_USE_RELATIVE_PATHS", cmProperty::VARIABLE,
"Use relative paths (May not work!).",
"If this is set to TRUE, then the CMake will use "
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- cmLocalGenerator.cxx 23 Jan 2008 18:03:03 -0000 1.259
+++ cmLocalGenerator.cxx 23 Jan 2008 18:30:55 -0000 1.260
@@ -1454,10 +1454,9 @@
std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- // Work-ardound MSVC 6 command line bug. This block is only needed
- // on windows when we are really using the MSVC 6.0 compiler command
- // line.
- if(this->Makefile->IsOn("MSVC60"))
+ // Work-ardound command line parsing limitations in MSVC 6.0 and
+ // Watcom.
+ if(this->Makefile->IsOn("MSVC60") || this->Makefile->IsOn("WATCOM"))
{
// Search for the last space.
std::string::size_type pos = lib.rfind(' ');
Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmComputeLinkInformation.cxx 23 Jan 2008 15:21:08 -0000 1.3
+++ cmComputeLinkInformation.cxx 23 Jan 2008 18:30:55 -0000 1.4
@@ -187,6 +187,8 @@
// Get options needed to link libraries.
this->LibLinkFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
+ this->LibLinkFileFlag =
+ this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG");
this->LibLinkSuffix =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX");
@@ -622,6 +624,12 @@
this->SetCurrentLinkType(LinkShared);
}
+ // If this platform wants a flag before the full path, add it.
+ if(!this->LibLinkFileFlag.empty())
+ {
+ this->Items.push_back(Item(this->LibLinkFileFlag, false));
+ }
+
// Now add the full path to the library.
this->Items.push_back(Item(item, true));
}
@@ -650,6 +658,12 @@
}
}
+ // If this platform wants a flag before the full path, add it.
+ if(!this->LibLinkFileFlag.empty())
+ {
+ this->Items.push_back(Item(this->LibLinkFileFlag, false));
+ }
+
// Now add the full path to the library.
this->Items.push_back(Item(item, true));
}
Index: cmComputeLinkInformation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmComputeLinkInformation.h 22 Jan 2008 15:05:27 -0000 1.2
+++ cmComputeLinkInformation.h 23 Jan 2008 18:30:55 -0000 1.3
@@ -74,6 +74,7 @@
bool UseImportLibrary;
const char* LoaderFlag;
std::string LibLinkFlag;
+ std::string LibLinkFileFlag;
std::string LibLinkSuffix;
// Link type adjustment.
More information about the Cmake-commits
mailing list