Watcom: Enable 'WMake Makefiles' generator on Linux

This commit is contained in:
Jiri Malak 2014-03-17 19:30:38 +01:00 committed by Brad King
parent 5d9aa66c91
commit 64c2342a8d
3 changed files with 20 additions and 4 deletions

View File

@ -404,7 +404,6 @@ if (WIN32)
cmGlobalVisualStudio12Generator.cxx cmGlobalVisualStudio12Generator.cxx
cmGlobalVisualStudioGenerator.cxx cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
cmIDEFlagTable.h cmIDEFlagTable.h
cmIDEOptions.cxx cmIDEOptions.cxx
cmIDEOptions.h cmIDEOptions.h
@ -424,6 +423,15 @@ if (WIN32)
endif() endif()
endif () endif ()
# Watcom support
if(WIN32 OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set_property(SOURCE cmake.cxx APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_USE_WMAKE)
list(APPEND SRCS
cmGlobalWatcomWMakeGenerator.cxx
cmGlobalWatcomWMakeGenerator.h
)
endif()
# Ninja support # Ninja support
set(SRCS ${SRCS} set(SRCS ${SRCS}
cmGlobalNinjaGenerator.cxx cmGlobalNinjaGenerator.cxx

View File

@ -16,7 +16,9 @@
cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
{ {
this->FindMakeProgramFile = "CMakeFindWMake.cmake"; this->FindMakeProgramFile = "CMakeFindWMake.cmake";
#ifdef _WIN32
this->ForceUnixPaths = false; this->ForceUnixPaths = false;
#endif
this->ToolSupportsColor = true; this->ToolSupportsColor = true;
this->NeedSymbolicMark = true; this->NeedSymbolicMark = true;
this->EmptyRuleHackCommand = "@cd ."; this->EmptyRuleHackCommand = "@cd .";
@ -44,7 +46,9 @@ cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
{ {
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
lg->SetDefineWindowsNULL(true); lg->SetDefineWindowsNULL(true);
#ifdef _WIN32
lg->SetWindowsShell(true); lg->SetWindowsShell(true);
#endif
lg->SetWatcomWMake(true); lg->SetWatcomWMake(true);
lg->SetMakeSilentFlag("-h"); lg->SetMakeSilentFlag("-h");
lg->SetGlobalGenerator(this); lg->SetGlobalGenerator(this);

View File

@ -60,13 +60,15 @@
# include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h"
# include "cmGlobalJOMMakefileGenerator.h" # include "cmGlobalJOMMakefileGenerator.h"
# include "cmGlobalWatcomWMakeGenerator.h"
# define CMAKE_HAVE_VS_GENERATORS # define CMAKE_HAVE_VS_GENERATORS
# endif # endif
# include "cmGlobalMSYSMakefileGenerator.h" # include "cmGlobalMSYSMakefileGenerator.h"
# include "cmGlobalMinGWMakefileGenerator.h" # include "cmGlobalMinGWMakefileGenerator.h"
#else #else
#endif #endif
#if defined(CMAKE_USE_WMAKE)
# include "cmGlobalWatcomWMakeGenerator.h"
#endif
#include "cmGlobalUnixMakefileGenerator3.h" #include "cmGlobalUnixMakefileGenerator3.h"
#include "cmGlobalNinjaGenerator.h" #include "cmGlobalNinjaGenerator.h"
#include "cmExtraCodeLiteGenerator.h" #include "cmExtraCodeLiteGenerator.h"
@ -1781,8 +1783,6 @@ void cmake::AddDefaultGenerators()
cmGlobalNMakeMakefileGenerator::NewFactory()); cmGlobalNMakeMakefileGenerator::NewFactory());
this->Generators.push_back( this->Generators.push_back(
cmGlobalJOMMakefileGenerator::NewFactory()); cmGlobalJOMMakefileGenerator::NewFactory());
this->Generators.push_back(
cmGlobalWatcomWMakeGenerator::NewFactory());
# endif # endif
this->Generators.push_back( this->Generators.push_back(
cmGlobalMSYSMakefileGenerator::NewFactory()); cmGlobalMSYSMakefileGenerator::NewFactory());
@ -1793,6 +1793,10 @@ void cmake::AddDefaultGenerators()
cmGlobalUnixMakefileGenerator3::NewFactory()); cmGlobalUnixMakefileGenerator3::NewFactory());
this->Generators.push_back( this->Generators.push_back(
cmGlobalNinjaGenerator::NewFactory()); cmGlobalNinjaGenerator::NewFactory());
#if defined(CMAKE_USE_WMAKE)
this->Generators.push_back(
cmGlobalWatcomWMakeGenerator::NewFactory());
#endif
#ifdef CMAKE_USE_XCODE #ifdef CMAKE_USE_XCODE
this->Generators.push_back( this->Generators.push_back(
cmGlobalXCodeGenerator::NewFactory()); cmGlobalXCodeGenerator::NewFactory());