summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake
diff options
context:
space:
mode:
authorGeorge Rokos <grokos@us.ibm.com>2017-01-25 21:27:24 +0000
committerGeorge Rokos <grokos@us.ibm.com>2017-01-25 21:27:24 +0000
commit2467df6e4f04e3d0e8e78d662473ba1b87c0a885 (patch)
tree4edaff3644109115394f27b5ecf914436b650aab /openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake
parentc0fc25307143dd06c12fb2f5ebdb1dade7290ccf (diff)
downloadbcm5719-llvm-2467df6e4f04e3d0e8e78d662473ba1b87c0a885.tar.gz
bcm5719-llvm-2467df6e4f04e3d0e8e78d662473ba1b87c0a885.zip
[OpenMP] Initial implementation of OpenMP offloading library - libomptarget.
This is the patch upstreaming the device-agnostic part of libomptarget. Differential Revision: https://reviews.llvm.org/D14031 llvm-svn: 293094
Diffstat (limited to 'openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake')
-rw-r--r--openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake b/openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake
new file mode 100644
index 00000000000..d9649038587
--- /dev/null
+++ b/openmp/libomptarget/cmake/Modules/LibomptargetUtils.cmake
@@ -0,0 +1,28 @@
+#
+#//===----------------------------------------------------------------------===//
+#//
+#// The LLVM Compiler Infrastructure
+#//
+#// This file is dual licensed under the MIT and the University of Illinois Open
+#// Source Licenses. See LICENSE.txt for details.
+#//
+#//===----------------------------------------------------------------------===//
+#
+
+# void libomptarget_say(string message_to_user);
+# - prints out message_to_user
+macro(libomptarget_say message_to_user)
+ message(STATUS "LIBOMPTARGET: ${message_to_user}")
+endmacro()
+
+# void libomptarget_warning_say(string message_to_user);
+# - prints out message_to_user with a warning
+macro(libomptarget_warning_say message_to_user)
+ message(WARNING "LIBOMPTARGET: ${message_to_user}")
+endmacro()
+
+# void libomptarget_error_say(string message_to_user);
+# - prints out message_to_user with an error and exits cmake
+macro(libomptarget_error_say message_to_user)
+ message(FATAL_ERROR "LIBOMPTARGET: ${message_to_user}")
+endmacro()
OpenPOWER on IntegriCloud