CMAKE_WATCOM_RUNTIME_LIBRARY.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. CMAKE_WATCOM_RUNTIME_LIBRARY
  2. ----------------------------
  3. .. versionadded:: 3.24
  4. Select the Watcom runtime library for use by compilers targeting the Watcom ABI.
  5. This variable is used to initialize the :prop_tgt:`WATCOM_RUNTIME_LIBRARY`
  6. property on all targets as they are created. It is also propagated by
  7. calls to the :command:`try_compile` command into the test project.
  8. The allowed values are:
  9. .. include:: ../prop_tgt/WATCOM_RUNTIME_LIBRARY-VALUES.txt
  10. Use :manual:`generator expressions <cmake-generator-expressions(7)>` to
  11. support per-configuration specification.
  12. For example, the code:
  13. .. code-block:: cmake
  14. set(CMAKE_WATCOM_RUNTIME_LIBRARY "MultiThreaded")
  15. selects for all following targets a multi-threaded statically-linked runtime
  16. library.
  17. If this variable is not set then the :prop_tgt:`WATCOM_RUNTIME_LIBRARY` target
  18. property will not be set automatically. If that property is not set then
  19. CMake uses the default value ``MultiThreadedDLL`` on Windows and
  20. ``SingleThreaded`` on other platforms to select a Watcom runtime library.
  21. .. note::
  22. This variable has effect only when policy :policy:`CMP0136` is set to ``NEW``
  23. prior to the first :command:`project` or :command:`enable_language` command
  24. that enables a language using a compiler targeting the Watcom ABI.