diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2014-04-04 21:06:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-08 17:28:54 (GMT) |
commit | cb9b1e13e4de88deb1d675ee26859615c393e9c5 (patch) | |
tree | 05bea6450b10c2aab9067c1062cb55afcebe9629 /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 9b1abc543e9aee946e093229e1715c4b8a961514 (diff) | |
download | CMake-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/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 701d5a0..fc52ccc 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -290,7 +290,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) linkRuleVar += linkLanguage; linkRuleVar += "_LINK_EXECUTABLE"; std::string linkRule = this->GetLinkRule(linkRuleVar); - bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE"); std::vector<std::string> commands1; cmSystemTools::ExpandListArgument(linkRule, real_link_commands); if(this->Target->IsExecutableWithExports()) @@ -333,12 +332,15 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Expand the rule variables. { + bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE"); + // Set path conversion for link script shells. this->LocalGenerator->SetLinkScriptShell(useLinkScript); // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends); + this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, + useWatcomQuote); // Construct object file lists that may be needed to expand the // rule. @@ -357,7 +359,12 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) 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.TargetPDB = targetOutPathPDB.c_str(); // Setup the target version. |