mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
Merge topic 'watcom-updates'
64c2342aWatcom: Enable 'WMake Makefiles' generator on Linux5d9aa66cWatcom: Introduce OpenWatcom compiler id and fix compiler version9292d3b8Watcom: Detect compiler target architecture and platformfbc883c9Watcom: Add one blank line to Makefile for better readability
This commit is contained in:
@@ -68,10 +68,19 @@
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100)
|
||||
# if __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# else
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# define COMPILER_ID "SunPro"
|
||||
|
||||
@@ -73,10 +73,19 @@
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100)
|
||||
# if __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# else
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_CC)
|
||||
# define COMPILER_ID "SunPro"
|
||||
|
||||
@@ -74,6 +74,23 @@
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID ""
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID ""
|
||||
|
||||
@@ -107,6 +124,17 @@
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_ID ""
|
||||
#endif
|
||||
|
||||
@@ -374,10 +374,6 @@ if(WATCOM)
|
||||
string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
|
||||
list(GET _watcom_version_list 0 _watcom_major)
|
||||
list(GET _watcom_version_list 1 _watcom_minor)
|
||||
if(${_watcom_major} GREATER 11)
|
||||
math(EXPR _watcom_major "${_watcom_major} - 11")
|
||||
endif()
|
||||
math(EXPR _watcom_minor "${_watcom_minor} / 10")
|
||||
set( __install__libs
|
||||
${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
|
||||
${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
|
||||
|
||||
@@ -93,16 +93,18 @@ if(NOT _CMAKE_WATCOM_VERSION)
|
||||
set(WATCOM17)
|
||||
set(WATCOM18)
|
||||
set(WATCOM19)
|
||||
if("${_compiler_version}" LESS 12.70)
|
||||
set(WATCOM16 1)
|
||||
endif()
|
||||
if("${_compiler_version}" EQUAL 12.70)
|
||||
set(WATCOM17 1)
|
||||
endif()
|
||||
if("${_compiler_version}" EQUAL 12.80)
|
||||
set(WATCOM18 1)
|
||||
endif()
|
||||
if("${_compiler_version}" EQUAL 12.90)
|
||||
set(WATCOM19 1)
|
||||
if("${_compiler_id}" STREQUAL "OpenWatcom")
|
||||
if("${_compiler_version}" VERSION_LESS 1.7)
|
||||
set(WATCOM16 1)
|
||||
endif()
|
||||
if("${_compiler_version}" VERSION_EQUAL 1.7)
|
||||
set(WATCOM17 1)
|
||||
endif()
|
||||
if("${_compiler_version}" VERSION_EQUAL 1.8)
|
||||
set(WATCOM18 1)
|
||||
endif()
|
||||
if("${_compiler_version}" VERSION_EQUAL 1.9)
|
||||
set(WATCOM19 1)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user