2006-01-17 18:21:45 +03:00
|
|
|
SET(CMAKE_LIBRARY_PATH_FLAG "libpath ")
|
|
|
|
SET(CMAKE_LINK_LIBRARY_FLAG "library ")
|
2008-01-23 21:30:55 +03:00
|
|
|
SET(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
|
|
|
IF(CMAKE_VERBOSE_MAKEFILE)
|
|
|
|
SET(CMAKE_WCL_QUIET)
|
|
|
|
SET(CMAKE_WLINK_QUIET)
|
|
|
|
SET(CMAKE_LIB_QUIET)
|
|
|
|
ELSE(CMAKE_VERBOSE_MAKEFILE)
|
|
|
|
SET(CMAKE_WCL_QUIET "-zq")
|
|
|
|
SET(CMAKE_WLINK_QUIET "option quiet")
|
|
|
|
SET(CMAKE_LIB_QUIET "-q")
|
|
|
|
ENDIF(CMAKE_VERBOSE_MAKEFILE)
|
|
|
|
|
2010-09-02 22:35:17 +04:00
|
|
|
set(CMAKE_CREATE_WIN32_EXE "system nt_win" )
|
|
|
|
SET(CMAKE_CREATE_CONSOLE_EXE "system nt" )
|
|
|
|
|
|
|
|
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "debug all" )
|
|
|
|
SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" )
|
|
|
|
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
|
|
|
|
SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
|
|
|
|
|
|
|
|
set (CMAKE_SHARED_LIBRARY_C_FLAGS "-bd" )
|
|
|
|
|
|
|
|
SET(CMAKE_RC_COMPILER "rc" )
|
|
|
|
|
2006-01-17 18:21:45 +03:00
|
|
|
SET(CMAKE_BUILD_TYPE_INIT Debug)
|
|
|
|
SET (CMAKE_CXX_FLAGS_INIT "-w=3 -xs")
|
2010-09-02 22:35:17 +04:00
|
|
|
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2")
|
2006-01-17 18:21:45 +03:00
|
|
|
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
|
|
|
|
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
|
|
|
|
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
|
|
|
|
SET (CMAKE_C_FLAGS_INIT "-w=3 ")
|
2010-09-02 22:35:17 +04:00
|
|
|
SET (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -d2 -od")
|
2006-01-17 18:21:45 +03:00
|
|
|
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
|
|
|
|
SET (CMAKE_C_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
|
2010-09-02 22:35:17 +04:00
|
|
|
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
|
2006-04-12 00:55:49 +04:00
|
|
|
SET (CMAKE_C_STANDARD_LIBRARIES_INIT "library clbrdll.lib library plbrdll.lib library kernel32.lib library user32.lib library gdi32.lib library winspool.lib library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib")
|
|
|
|
SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
2007-03-22 16:45:25 +03:00
|
|
|
SET(CMAKE_C_CREATE_IMPORT_LIBRARY
|
2011-07-29 21:52:23 +04:00
|
|
|
"wlib -c -q -n -b <TARGET_IMPLIB> +'<TARGET_UNQUOTED>'")
|
2007-03-22 16:45:25 +03:00
|
|
|
SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
|
|
|
|
|
2006-01-17 18:21:45 +03:00
|
|
|
SET(CMAKE_C_LINK_EXECUTABLE
|
2010-06-01 22:40:28 +04:00
|
|
|
"wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
2010-09-02 22:35:17 +04:00
|
|
|
|
2006-01-17 18:21:45 +03:00
|
|
|
SET(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
|
|
|
|
|
|
|
|
# compile a C++ file into an object file
|
|
|
|
SET(CMAKE_CXX_COMPILE_OBJECT
|
2008-01-14 17:20:58 +03:00
|
|
|
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<OBJECT> -c -cc++ <SOURCE>${CMAKE_END_TEMP_FILE}")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
|
|
|
# compile a C file into an object file
|
|
|
|
SET(CMAKE_C_COMPILE_OBJECT
|
2008-01-14 17:20:58 +03:00
|
|
|
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<OBJECT> -c -cc <SOURCE>${CMAKE_END_TEMP_FILE}")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
2007-05-16 21:26:47 +04:00
|
|
|
# preprocess a C source file
|
|
|
|
SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE
|
2008-01-14 17:20:58 +03:00
|
|
|
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<PREPROCESSED_SOURCE> -pl -cc <SOURCE>${CMAKE_END_TEMP_FILE}")
|
2007-05-16 21:26:47 +04:00
|
|
|
|
|
|
|
# preprocess a C++ source file
|
|
|
|
SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
|
2008-01-14 17:20:58 +03:00
|
|
|
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<PREPROCESSED_SOURCE> -pl -cc++ <SOURCE>${CMAKE_END_TEMP_FILE}")
|
2007-05-16 21:26:47 +04:00
|
|
|
|
2007-03-10 15:49:47 +03:00
|
|
|
SET(CMAKE_CXX_CREATE_SHARED_MODULE
|
2010-06-01 22:40:28 +04:00
|
|
|
"wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
|
2007-03-22 16:45:25 +03:00
|
|
|
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
|
|
|
|
${CMAKE_CXX_CREATE_SHARED_MODULE}
|
|
|
|
${CMAKE_CXX_CREATE_IMPORT_LIBRARY})
|
2006-01-17 18:21:45 +03:00
|
|
|
|
|
|
|
# create a C shared library
|
|
|
|
SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
|
|
|
|
|
2007-03-10 15:49:47 +03:00
|
|
|
# create a C shared module
|
|
|
|
SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE})
|
2006-01-17 18:21:45 +03:00
|
|
|
|
|
|
|
# create a C++ static library
|
2011-07-29 21:52:23 +04:00
|
|
|
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -c -n -b '<TARGET_UNQUOTED>' <LINK_FLAGS> <OBJECTS> ")
|
2006-01-17 18:21:45 +03:00
|
|
|
|
|
|
|
# create a C static library
|
|
|
|
SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
|
2011-07-29 21:28:54 +04:00
|
|
|
|
|
|
|
IF(NOT CMAKE_WATCOM_COMPILER_TESTS_RUN)
|
|
|
|
SET(CMAKE_WATCOM_COMPILER_TESTS_RUN 1)
|
|
|
|
SET(testWatcomVersionFile
|
|
|
|
"${CMAKE_ROOT}/Modules/CMakeTestWatcomVersion.c")
|
|
|
|
STRING(REGEX REPLACE "/" "\\\\" testWatcomVersionFile "${testWatcomVersionFile}")
|
|
|
|
MESSAGE(STATUS "Check for Watcom compiler version")
|
|
|
|
SET(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER})
|
|
|
|
IF (NOT CMAKE_C_COMPILER)
|
|
|
|
SET(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER})
|
|
|
|
ENDIF()
|
|
|
|
EXECUTE_PROCESS(COMMAND ${CMAKE_TEST_COMPILER}
|
|
|
|
-q -pc \"${testWatcomVersionFile}\"
|
|
|
|
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
|
2011-08-01 23:29:13 +04:00
|
|
|
RESULT_VARIABLE CMAKE_COMPILER_RETURN
|
2011-07-29 21:28:54 +04:00
|
|
|
)
|
|
|
|
STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
|
|
|
|
STRING(REGEX REPLACE ".*VERSION=(.*)" "\\1"
|
|
|
|
compilerVersion "${compilerVersion}")
|
2011-08-01 23:29:13 +04:00
|
|
|
IF("${CMAKE_COMPILER_RETURN}" STREQUAL "0")
|
2011-07-29 21:28:54 +04:00
|
|
|
SET(WATCOM16)
|
|
|
|
SET(WATCOM17)
|
|
|
|
SET(WATCOM18)
|
|
|
|
SET(WATCOM19)
|
|
|
|
IF("${compilerVersion}" LESS 1270)
|
|
|
|
SET(WATCOM16 1)
|
|
|
|
ENDIF()
|
|
|
|
IF("${compilerVersion}" EQUAL 1270)
|
|
|
|
SET(WATCOM17 1)
|
|
|
|
ENDIF()
|
|
|
|
IF("${compilerVersion}" EQUAL 1280)
|
|
|
|
SET(WATCOM18 1)
|
|
|
|
ENDIF()
|
|
|
|
IF("${compilerVersion}" EQUAL 1290)
|
|
|
|
SET(WATCOM19 1)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|