summaryrefslogtreecommitdiff
path: root/Tests/WatcomRuntimeLibrary/verify.h
diff options
context:
space:
mode:
authorCameron Cawley <ccawley2011@gmail.com>2021-10-18 23:20:07 +0100
committerBrad King <brad.king@kitware.com>2022-05-06 10:40:58 -0400
commit33da5824acefcb4106ce89fc2278111dc3846c0a (patch)
treeee90b8f17abb3948ab3f3cc1fe592c4f24bcdbcd /Tests/WatcomRuntimeLibrary/verify.h
parent849ad97d9576697b180547d8d850b59e7100c6c0 (diff)
downloadcmake-33da5824acefcb4106ce89fc2278111dc3846c0a.tar.gz
OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the runtime library selection. Add policy CMP0136 to switch to in place of the old hard-coded default flags. Fixes: #23178
Diffstat (limited to 'Tests/WatcomRuntimeLibrary/verify.h')
-rw-r--r--Tests/WatcomRuntimeLibrary/verify.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/WatcomRuntimeLibrary/verify.h b/Tests/WatcomRuntimeLibrary/verify.h
new file mode 100644
index 0000000000..6c67e6d248
--- /dev/null
+++ b/Tests/WatcomRuntimeLibrary/verify.h
@@ -0,0 +1,31 @@
+#ifdef VERIFY_DLL
+# ifndef _DLL
+# error "_DLL not defined by DLL runtime library selection"
+# endif
+# ifndef __SW_BR
+# error "__SW_BR not defined by DLL runtime library selection"
+# endif
+#else
+# ifdef _DLL
+# error "_DLL defined by non-DLL runtime library selection"
+# endif
+# ifdef __SW_BR
+# error "__SW_BR defined by non-DLL runtime library selection"
+# endif
+#endif
+
+#ifdef VERIFY_MT
+# ifndef _MT
+# error "_MT not defined by multi-threaded runtime library selection"
+# endif
+# ifndef __SW_BM
+# error "__SW_BM not defined by multi-threaded runtime library selection"
+# endif
+#else
+# ifdef _MT
+# error "_MT defined by single-threaded runtime library selection"
+# endif
+# ifdef __SW_BM
+# error "__SW_BM defined by single-threaded runtime library selection"
+# endif
+#endif