summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt
diff options
context:
space:
mode:
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r--Help/prop_tgt/WATCOM_RUNTIME_LIBRARY-VALUES.txt18
-rw-r--r--Help/prop_tgt/WATCOM_RUNTIME_LIBRARY.rst33
2 files changed, 51 insertions, 0 deletions
diff --git a/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY-VALUES.txt b/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY-VALUES.txt
new file mode 100644
index 0000000..c29d73e
--- /dev/null
+++ b/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY-VALUES.txt
@@ -0,0 +1,18 @@
+``SingleThreaded``
+ Compile without additional flags to use a single-threaded
+ statically-linked runtime library.
+``SingleThreadedDLL``
+ Compile with ``-br`` or equivalent flag(s) to use a single-threaded
+ dynamically-linked runtime library.
+``MultiThreaded``
+ Compile with ``-bm`` or equivalent flag(s) to use a multi-threaded
+ statically-linked runtime library.
+``MultiThreadedDLL``
+ Compile with ``-bm -br`` or equivalent flag(s) to use a multi-threaded
+ dynamically-linked runtime library.
+
+The value is ignored on non-Watcom compilers but an unsupported value will
+be rejected as an error when using a compiler targeting the Watcom ABI.
+
+The value may also be the empty string (``""``) in which case no runtime
+library selection flag will be added explicitly by CMake.
diff --git a/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY.rst b/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY.rst
new file mode 100644
index 0000000..9f031fa
--- /dev/null
+++ b/Help/prop_tgt/WATCOM_RUNTIME_LIBRARY.rst
@@ -0,0 +1,33 @@
+WATCOM_RUNTIME_LIBRARY
+----------------------
+
+.. versionadded:: 3.24
+
+Select the Watcom runtime library for use by compilers targeting the Watcom ABI.
+
+The allowed values are:
+
+.. include:: WATCOM_RUNTIME_LIBRARY-VALUES.txt
+
+Use :manual:`generator expressions <cmake-generator-expressions(7)>` to
+support per-configuration specification.
+
+For example, the code:
+
+.. code-block:: cmake
+
+ add_executable(foo foo.c)
+ set_property(TARGET foo PROPERTY
+ WATCOM_RUNTIME_LIBRARY "MultiThreaded")
+
+selects for the target ``foo`` a multi-threaded statically-linked runtime
+library.
+
+If this property is not set then CMake uses the default value
+``MultiThreadedDLL`` to select a Watcom runtime library.
+
+.. note::
+
+ This property has effect only when policy :policy:`CMP0136` is set to ``NEW``
+ prior to the first :command:`project` or :command:`enable_language` command
+ that enables a language using a compiler targeting the Watcom ABI.