summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkInformation.cxx14
-rw-r--r--Source/cmComputeLinkInformation.h1
-rw-r--r--Source/cmDocumentVariables.cxx6
-rw-r--r--Source/cmLocalGenerator.cxx7
4 files changed, 24 insertions, 4 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index d5df212..78ad4de 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -187,6 +187,8 @@ cmComputeLinkInformation
// 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 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
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 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item)
}
}
+ // 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));
}
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index e45ac9f..f082e09 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -74,6 +74,7 @@ private:
bool UseImportLibrary;
const char* LoaderFlag;
std::string LibLinkFlag;
+ std::string LibLinkFileFlag;
std::string LibLinkSuffix;
// Link type adjustment.
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index d744145..33b0a6e 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -778,6 +778,12 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"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 "
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 62245fe..f49e1bd 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1454,10 +1454,9 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
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(' ');