[cmake-developers] Watcom updates in 3.1 break linking usable code

J Decker d3ck0r at gmail.com
Sat Nov 1 19:26:20 EDT 2014


*regarding prior issue; might be because I had not cleaned properly when
changing versions of cmake; because with fix and reinstall, I ended up
duplicating the system nt_dll option *

Should add version ...
also in windows-wcl386.cmake

if(NOT _CMAKE_WATCOM_VERSION)
  set(_CMAKE_WATCOM_VERSION 1)
  if(CMAKE_C_COMPILER_VERSION)
    set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
    set(_compiler_id ${CMAKE_C_COMPILER_ID})
  else()
    set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
    set(_compiler_id ${CMAKE_CXX_COMPILER_ID})
  endif()
  set(WATCOM16)
  set(WATCOM17)
  set(WATCOM18)
  set(WATCOM19)
  set(WATCOM20)
  if("${_compiler_id}" STREQUAL "OpenWatcom")
    if("${_compiler_version}" VERSION_LESS 1.7)
      set(WATCOM16 1)
    endif()
    if("${_compiler_version}" VERSION_EQUAL 1.7)
      set(WATCOM17 1)
    endif()
    if("${_compiler_version}" VERSION_EQUAL 1.8)
      set(WATCOM18 1)
    endif()
    if("${_compiler_version}" VERSION_EQUAL 1.9)
      set(WATCOM19 1)
    endif()
    if("${_compiler_version}" VERSION_EQUAL 2.0)
      set(WATCOM20 1)
    endif()
  endif()
endif()


On Sat, Nov 1, 2014 at 4:03 PM, J Decker <d3ck0r at gmail.com> wrote:

> wlink uses the option 'system nt_dll' if it builds a DLL; if this is not
> specified, the resulting file generates exceptions.
>
> This was moved from ...
>
> / ---- modules/platform/windows-wcl386.cmake ------
> set(CMAKE_CXX_CREATE_SHARED_LIBRARY
>  "wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name <TARGET>
> <LINK_FLAGS> option implib=<TARGET_IMPLIB> file {<OBJECTS>}
> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
>
> /------ used to be ----- /
> set(CMAKE_CXX_CREATE_SHARED_MODULE
>  "wlink ${CMAKE_START_TEMP_FILE} system nt_dll  ${CMAKE_WLINK_QUIET} name
> '<TARGET_UNQUOTED>' <LINK_FLAGS> option implib=<TARGET_IMPLIB> option
> caseexact  file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
> ----------------
>
> ... to a variable
>
> CMAKE_SHARED_LINKER_FLAGS_INIT
>
> but I don't see the latter flag ever being used.
>
> So the generator does not output 'system nt_dll' when building shared
> library targets.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141101/9c7b44a8/attachment.html>


More information about the cmake-developers mailing list