summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/DOS-OpenWatcom-C.cmake1
-rw-r--r--Modules/Platform/DOS-OpenWatcom-CXX.cmake1
-rw-r--r--Modules/Platform/DOS-OpenWatcom.cmake11
-rw-r--r--Modules/Platform/Linux-OpenWatcom.cmake14
-rw-r--r--Modules/Platform/OS2-OpenWatcom.cmake22
-rw-r--r--Modules/Platform/Windows-OpenWatcom.cmake50
6 files changed, 38 insertions, 61 deletions
diff --git a/Modules/Platform/DOS-OpenWatcom-C.cmake b/Modules/Platform/DOS-OpenWatcom-C.cmake
index cf71c84b5a..c6f65c0da4 100644
--- a/Modules/Platform/DOS-OpenWatcom-C.cmake
+++ b/Modules/Platform/DOS-OpenWatcom-C.cmake
@@ -1 +1,2 @@
include(Platform/DOS-OpenWatcom)
+__dos_open_watcom(C)
diff --git a/Modules/Platform/DOS-OpenWatcom-CXX.cmake b/Modules/Platform/DOS-OpenWatcom-CXX.cmake
index cf71c84b5a..90d6407f7c 100644
--- a/Modules/Platform/DOS-OpenWatcom-CXX.cmake
+++ b/Modules/Platform/DOS-OpenWatcom-CXX.cmake
@@ -1 +1,2 @@
include(Platform/DOS-OpenWatcom)
+__dos_open_watcom(CXX)
diff --git a/Modules/Platform/DOS-OpenWatcom.cmake b/Modules/Platform/DOS-OpenWatcom.cmake
index 54c452ebce..11a854c253 100644
--- a/Modules/Platform/DOS-OpenWatcom.cmake
+++ b/Modules/Platform/DOS-OpenWatcom.cmake
@@ -20,9 +20,8 @@ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated st
string(APPEND CMAKE_C_FLAGS_INIT " -bt=dos")
string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=dos -xs")
-if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h)
-endif()
-if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h)
-endif()
+macro(__dos_open_watcom lang)
+ if(NOT CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES)
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h)
+ endif()
+endmacro()
diff --git a/Modules/Platform/Linux-OpenWatcom.cmake b/Modules/Platform/Linux-OpenWatcom.cmake
index 678d373a36..731fd3c96c 100644
--- a/Modules/Platform/Linux-OpenWatcom.cmake
+++ b/Modules/Platform/Linux-OpenWatcom.cmake
@@ -23,16 +23,12 @@ unset(__LINUX_WATCOM_CMP0136)
string(APPEND CMAKE_C_FLAGS_INIT " -bt=linux")
string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=linux -xs")
-if(CMAKE_CROSSCOMPILING)
- if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/lh)
- endif()
- if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/lh)
- endif()
-endif()
-
macro(__linux_open_watcom lang)
+ if(CMAKE_CROSSCOMPILING)
+ if(NOT CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES)
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/lh)
+ endif()
+ endif()
set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded -bm)
endmacro()
diff --git a/Modules/Platform/OS2-OpenWatcom.cmake b/Modules/Platform/OS2-OpenWatcom.cmake
index 720b9530ef..9abcf28a62 100644
--- a/Modules/Platform/OS2-OpenWatcom.cmake
+++ b/Modules/Platform/OS2-OpenWatcom.cmake
@@ -27,22 +27,14 @@ unset(__OS2_WATCOM_CMP0136)
string(APPEND CMAKE_C_FLAGS_INIT " -bt=os2")
string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=os2 -xs")
-if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
- if(DEFINED CMAKE_SYSTEM_PROCESSOR AND CMAKE_SYSTEM_PROCESSOR STREQUAL "I86")
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os21x)
- else()
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os2)
- endif()
-endif()
-if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
- if(DEFINED CMAKE_SYSTEM_PROCESSOR AND CMAKE_SYSTEM_PROCESSOR STREQUAL "I86")
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os21x)
- else()
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os2)
- endif()
-endif()
-
macro(__os2_open_watcom lang)
+ if(NOT CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES)
+ if(DEFINED CMAKE_SYSTEM_PROCESSOR AND CMAKE_SYSTEM_PROCESSOR STREQUAL "I86")
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os21x)
+ else()
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/os2)
+ endif()
+ endif()
set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreadedDLL -br)
set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded -bm)
diff --git a/Modules/Platform/Windows-OpenWatcom.cmake b/Modules/Platform/Windows-OpenWatcom.cmake
index 4e731600d8..aba84cbcd2 100644
--- a/Modules/Platform/Windows-OpenWatcom.cmake
+++ b/Modules/Platform/Windows-OpenWatcom.cmake
@@ -39,40 +39,28 @@ endif()
unset(__WINDOWS_WATCOM_CMP0136)
unset(_br_bm)
-if(CMAKE_CROSSCOMPILING)
+macro(__windows_open_watcom lang)
if(DEFINED CMAKE_SYSTEM_PROCESSOR AND CMAKE_SYSTEM_PROCESSOR STREQUAL "I86")
- if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/win)
- endif()
- if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/win)
+ if(NOT CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES)
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/win)
endif()
+ set(CMAKE_${lang}_CREATE_WIN32_EXE "system windows")
+ set(CMAKE_${lang}_CREATE_CONSOLE_EXE "system windows")
+
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreadedDLL "")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded "")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreadedDLL "")
else()
- if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt)
- endif()
- if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
- set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt)
+ if(NOT CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES)
+ set(CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt)
endif()
- endif()
-endif()
+ set(CMAKE_${lang}_CREATE_WIN32_EXE "system nt_win")
+ set(CMAKE_${lang}_CREATE_CONSOLE_EXE "system nt")
-macro(__windows_open_watcom lang)
-if(DEFINED CMAKE_SYSTEM_PROCESSOR AND CMAKE_SYSTEM_PROCESSOR STREQUAL "I86")
- set(CMAKE_${lang}_CREATE_WIN32_EXE "system windows")
- set(CMAKE_${lang}_CREATE_CONSOLE_EXE "system windows")
-
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreadedDLL "")
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded "")
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreadedDLL "")
-else()
- set(CMAKE_${lang}_CREATE_WIN32_EXE "system nt_win")
- set(CMAKE_${lang}_CREATE_CONSOLE_EXE "system nt")
-
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreadedDLL -br)
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded -bm)
- set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreadedDLL -bm -br)
-endif()
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreaded "")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_SingleThreadedDLL -br)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreaded -bm)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WATCOM_RUNTIME_LIBRARY_MultiThreadedDLL -bm -br)
+ endif()
endmacro()