summaryrefslogtreecommitdiff
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorJiri Malak <malak.jiri@gmail.com>2014-03-25 07:17:45 +0100
committerBrad King <brad.king@kitware.com>2014-03-27 13:45:29 -0400
commit423009c17f50f837bca178a2cc5edfd62963f1ea (patch)
tree152751e8bd297948ac33517d2c8fc89e45e179df /Source/cmMakefileLibraryTargetGenerator.cxx
parenta863a8fecd368f3b17930dd7832fb2e0ba042616 (diff)
downloadcmake-423009c17f50f837bca178a2cc5edfd62963f1ea.tar.gz
Makefile: Generate single-quoted object lists for Watcom
Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile generators. The underlying problem is with the Watcom linker, not with WMake. The Watcom linker wants object files to be single-quoted. Add <LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the generators to use Watcom-style single quotes for object files on link lines. On Windows, Watcom uses the GetCommandLine API to get the original command-line string and do custom parsing that expects single quotes. On POSIX systems, Watcom approximates the original command line by joining all argv[] entries separated by a single space. Therefore we need to double-quote the single-quoted arguments so that the shell does not consume them and they are available for the parser to see.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 02469d1c30..754f62f3f0 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -458,6 +458,8 @@ 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();
@@ -553,7 +555,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// rule.
std::string buildObjs;
this->CreateObjectLists(useLinkScript, useArchiveRules,
- useResponseFileForObjects, buildObjs, depends);
+ useResponseFileForObjects, buildObjs, depends,
+ useWatcomQuote);
cmLocalGenerator::RuleVariables vars;
vars.TargetPDB = targetOutPathPDB.c_str();