summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorJiri Malak <malak.jiri@gmail.com>2014-04-04 21:06:13 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-08 17:28:54 (GMT)
commitcb9b1e13e4de88deb1d675ee26859615c393e9c5 (patch)
tree05bea6450b10c2aab9067c1062cb55afcebe9629 /Source/cmMakefileLibraryTargetGenerator.cxx
parent9b1abc543e9aee946e093229e1715c4b8a961514 (diff)
downloadCMake-cb9b1e13e4de88deb1d675ee26859615c393e9c5.zip
CMake-cb9b1e13e4de88deb1d675ee26859615c393e9c5.tar.gz
CMake-cb9b1e13e4de88deb1d675ee26859615c393e9c5.tar.bz2
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 754f62f..7ac0256 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))