summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-08-02 19:11:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-08-02 19:11:35 (GMT)
commitbd54141d5d098899afa36c6326811eb2230e99cf (patch)
treef31d365a4d78d6a45e39a3dbce048e15119ad2b3 /Modules/Platform
parent11ca173731a73b9635a0ebc2a16e116931e9de7a (diff)
parentff5971635170af8754edb029b5345e17fb4de4fa (diff)
downloadCMake-bd54141d5d098899afa36c6326811eb2230e99cf.zip
CMake-bd54141d5d098899afa36c6326811eb2230e99cf.tar.gz
CMake-bd54141d5d098899afa36c6326811eb2230e99cf.tar.bz2
Merge topic 'fix-11866-add-watcom-sys-libs'
ff59716 Watcom: Use correct args for execute_process call (#11866) 80769cd Add Watcom support to InstallRequiredSystemLibraries (#11866)
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-wcl386.cmake38
1 files changed, 38 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake
index f184e23..e1140df 100644
--- a/Modules/Platform/Windows-wcl386.cmake
+++ b/Modules/Platform/Windows-wcl386.cmake
@@ -81,3 +81,41 @@ SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -c -n -b '<TARGET_
# create a C static library
SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
+
+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
+ RESULT_VARIABLE CMAKE_COMPILER_RETURN
+ )
+ STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
+ STRING(REGEX REPLACE ".*VERSION=(.*)" "\\1"
+ compilerVersion "${compilerVersion}")
+ IF("${CMAKE_COMPILER_RETURN}" STREQUAL "0")
+ 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()