diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2023-01-24 19:44:11 (GMT) |
---|---|---|
committer | Jiri Malak <malak.jiri@gmail.com> | 2023-01-24 19:44:11 (GMT) |
commit | 10623a51a0840cb5f36ea9f9afb7830d8fdbc813 (patch) | |
tree | 235220627d08cba00dddd7152e02c275d99c2270 /Modules/Platform/Linux-OpenWatcom.cmake | |
parent | 62483b9b99647bcec8275d7b139a64e879623fcc (diff) | |
download | CMake-10623a51a0840cb5f36ea9f9afb7830d8fdbc813.zip CMake-10623a51a0840cb5f36ea9f9afb7830d8fdbc813.tar.gz CMake-10623a51a0840cb5f36ea9f9afb7830d8fdbc813.tar.bz2 |
OpenWatcom: Refactor population of standard include directories
Add setup of system include directories to language related macro to remove extra lines for C and CXX.
System include directories are always same for both languages (they are defined per platform).
Diffstat (limited to 'Modules/Platform/Linux-OpenWatcom.cmake')
-rw-r--r-- | Modules/Platform/Linux-OpenWatcom.cmake | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Modules/Platform/Linux-OpenWatcom.cmake b/Modules/Platform/Linux-OpenWatcom.cmake index 678d373..731fd3c 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() |