OpenWatcom: Enable 16-bit targets

Up to now CMake used OpenWatcom 32-bit target tools only.
This fix enable to use OpenWatcom 16-bit target tools too.

If CMAKE_SYSTEM_PROCESSOR(cross-compilation) is 'I86' then
OpenWatcom tools for 16-bit targets are used.
This commit is contained in:
Jiri Malak
2020-05-01 05:47:37 -04:00
parent 7a2535c5b6
commit 07faa3e73e
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -44,6 +44,16 @@ void cmGlobalWatcomWMakeGenerator::EnableLanguage(
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}
bool cmGlobalWatcomWMakeGenerator::SetSystemName(std::string const& s,
cmMakefile* mf)
{
if (mf->GetSafeDefinition("CMAKE_SYSTEM_PROCESSOR") == "I86") {
mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl");
}
return this->cmGlobalUnixMakefileGenerator3::SetSystemName(s, mf);
}
void cmGlobalWatcomWMakeGenerator::GetDocumentation(
cmDocumentationEntry& entry)
{
+3
View File
@@ -41,6 +41,9 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
/** Tell the generator about the target system. */
bool SetSystemName(std::string const& s, cmMakefile* mf) override;
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.