Watcom: Detect compiler target architecture and platform

In CMakePlatformId.h.in, fill ARCHITECTURE_ID and PLATFORM_ID for Open
Watcom.
This commit is contained in:
Jiri Malak 2014-03-17 19:38:57 +01:00 committed by Brad King
parent fbc883c942
commit 9292d3b8a0
1 changed files with 28 additions and 0 deletions

View File

@ -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