[cmake-developers] Cmake contribution for Open Watcom (patch)

Jiri Malak malak.jiri at gmail.com
Fri Feb 28 14:38:26 EST 2014


> Thanks!
>
> I've integrated the first change for testing here:
>
>  Watcom: Fix static library name quoting for wlib
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;hb=5c5be193
>
> with one tweak:
>
>> -set(CMAKE_CXX_CREATE_STATIC_LIBRARY  "wlib ${CMAKE_LIB_QUIET} -c -n -b '<TARGET_UNQUOTED>'
>> <LINK_FLAGS> <OBJECTS> ")
>> +set(CMAKE_CXX_CREATE_STATIC_LIBRARY  "wlib ${CMAKE_LIB_QUIET} -c -n -b <TARGET_QUOTED>
>> <OBJECTS> ")
>
> The <LINK_FLAGS> placeholder is still needed.  It gets the
> STATIC_LIBRARY_FLAGS:
>
>  http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt:STATIC_LIBRARY_FLAGS
>
> The LinkFlags* tests revealed this when I tested locally.
>

Good to know. It is confusing to mix Librarian flags with Linker flags.
It was for some historical reason?

> FYI, you can run the test suite with the Open Watcom compiler
> by configuring to build with another compiler but setting
> CMAKE_TEST_GENERATOR and CMAKE_TEST_MAKEPROGRAM to be
> "Watcom WMake" and "c:/path/to/wmake.exe", respectively.
> Then after building, open a terminal in an environment set up
> for Open Watcom and run "bin\ctest" to run the tests.  Add
> options "-j 8" for parallel testing or "-R someregex" to
> run a subset of tests or "-V" to see verbose test output.
>

Thanks for hint, it is very useful.

> In order to generalize support for this compiler to other
> platforms the Platform/Windows-wcl386.cmake module will need
> to be refactored into the modern way of dividing platform
> information across multiple files.  See the
>
>  Compiler/GNU.cmake
>  Compiler/GNU-C.cmake
>  Compiler/GNU-CXX.cmake
>  Platform/Windows-GNU.cmake
>  Platform/Windows-GNU-C.cmake
>  Platform/Windows-GNU-CXX.cmake
>
> files.  One might refactor Platform/Windows-wcl386.cmake into
>
>  Compiler/Watcom.cmake
>  Compiler/Watcom-C.cmake
>  Compiler/Watcom-CXX.cmake
>  Platform/Windows-Watcom.cmake
>  Platform/Windows-Watcom-C.cmake
>  Platform/Windows-Watcom-CXX.cmake
>
> for example.

I a little studied CMake internals, that it is exactly what I want to do.
I will add also OW Fortran compiler and OW asseblers definitions.

Regards

Jiri





More information about the cmake-developers mailing list