summaryrefslogtreecommitdiff
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorJiri Malak <malak.jiri@gmail.com>2014-04-04 23:06:13 +0200
committerBrad King <brad.king@kitware.com>2014-04-08 13:28:54 -0400
commitcb9b1e13e4de88deb1d675ee26859615c393e9c5 (patch)
tree05bea6450b10c2aab9067c1062cb55afcebe9629 /Source/cmMakefileLibraryTargetGenerator.cxx
parent9b1abc543e9aee946e093229e1715c4b8a961514 (diff)
downloadcmake-cb9b1e13e4de88deb1d675ee26859615c393e9c5.tar.gz
Watcom: Use single quote for all file/path items in wlink command
Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 754f62f3f0..7ac025687d 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -458,8 +458,6 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->Target);
}
- bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE");
-
// Determine whether a link script will be used.
bool useLinkScript = this->GlobalGenerator->GetUseLinkScript();
@@ -541,6 +539,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// Expand the rule variables.
std::vector<std::string> real_link_commands;
{
+ bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE");
+
// Set path conversion for link script shells.
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
@@ -548,7 +548,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
std::string linkLibs;
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
{
- this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends);
+ this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
+ useWatcomQuote);
}
// Construct object file lists that may be needed to expand the
@@ -587,7 +588,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
vars.ObjectDir = objectDir.c_str();
- vars.Target = targetOutPathReal.c_str();
+ cmLocalGenerator::OutputFormat output = (useWatcomQuote) ?
+ cmLocalGenerator::WATCOMQUOTE : cmLocalGenerator::SHELL;
+ std::string target = this->Convert(targetFullPathReal,
+ cmLocalGenerator::START_OUTPUT,
+ output);
+ vars.Target = target.c_str();
vars.LinkLibraries = linkLibs.c_str();
vars.ObjectsQuoted = buildObjs.c_str();
if (this->Target->HasSOName(this->ConfigName))