diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2020-05-01 14:12:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-06 17:09:58 (GMT) |
commit | 43c3243c2d344ae0bd62307893f49019fd335b71 (patch) | |
tree | 614aba3adbba7316c73a33479925d53c5a8723e4 /Modules/Platform | |
parent | d26eea220ac0da56f70b9bc2591131fa32d4b399 (diff) | |
download | CMake-43c3243c2d344ae0bd62307893f49019fd335b71.zip CMake-43c3243c2d344ae0bd62307893f49019fd335b71.tar.gz CMake-43c3243c2d344ae0bd62307893f49019fd335b71.tar.bz2 |
OpenWatcom: Fix Linux support file
Fix CMAKE_SHARED_LINKER_FLAGS_INIT macro
Fix executable file name for Linux to be without extension
Add system header files directory for cross-compilation
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Linux-OpenWatcom.cmake | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Modules/Platform/Linux-OpenWatcom.cmake b/Modules/Platform/Linux-OpenWatcom.cmake index df23366..5b4e995 100644 --- a/Modules/Platform/Linux-OpenWatcom.cmake +++ b/Modules/Platform/Linux-OpenWatcom.cmake @@ -4,13 +4,22 @@ # This module is shared by multiple languages; use include blocker. include_guard() -string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " system linux") -string(APPEND CMAKE_MODULE_LINKER_FLAGS_INIT " system linux") -string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " system linux") - set(CMAKE_BUILD_TYPE_INIT Debug) +string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " system linux opt noextension") +string(APPEND CMAKE_MODULE_LINKER_FLAGS_INIT " system linux") +string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " system linux") + # single/multi-threaded /-bm # default is setup for single-threaded libraries 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() |