#Toolchain file using the Watcom "wcl" compiler and nasm assembler to generate 16-bit DOS programs. #This file has been generated from the file #osd/openwatcom/1.0/src/toolchain-template.txt #Do not modify. Modifications will be overwritten when this file is regenerated. #Allows us to use the "wcl" watcom compiler with cmake. set (CMAKE_SYSTEM_NAME "@TOOLCHAIN_SYSTEM_NAME@") #Windows etc set (CMAKE_SYSTEM_VERSION "@TOOLCHAIN_SYSTEM_VERSION@") #xx.yy set (CMAKE_SYSTEM_PROCESSOR "@TOOLCHAIN_SYSTEM_PROCESSOR@") #AMD64/ARM set (CMAKE_C_COMPILER "@TOOLCHAIN_C_EXECUTABLE@") #Full path of the compiler launcher that launches wcl after setting up environment set (CMAKE_C_FLAGS_INIT "-bcl=dos") #Tells "wcl" compiler to generate 16 bit DOS set (CMAKE_ASM_NASM_OBJECT_FORMAT obj) #The nasm assembler should generate 16 bit object files set(CMAKE_C_COMPILER_WORKS 1) #Skip testing the compiler - it fails for some strange reason set(CMAKE_CXX_COMPILER_WORKS 1) #Skip testing the compiler - it fails for some strange reason #set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) #CMake has builtin support for the Watcom compiler, and will properly identify #and invoke it. However, CMake assumes that the compiler and the accompanying #utilities are in the PATH. By default, wlink will be used as the linker, and #will not be found because we have not set up the PATH. To address this #problem, we use instead CMAKE_C_COMPILER as the linker, which is specified #with a full path so it will always be found. set(CMAKE_C_LINK_EXECUTABLE " -fe ") #The standard CMake distribution does not apply below, so make sure #they are applied. #See https://cmake.org/pipermail/cmake-developers/2016-March/028103.html set(CMAKE_ASM_NASM_COMPILE_OBJECT " -f obj -o ") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)