From 0d0848ba049b2e4131a0cd562fdb831fa45a3967 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 13 Sep 2018 10:28:35 +0200 Subject: [PATCH] Add require-cuda.patch Requiring CUDA cannot be specified from cmake command line, so we have to patch the source. --- debian/patches/require-cuda.patch | 33 +++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 34 insertions(+) create mode 100644 debian/patches/require-cuda.patch diff --git a/debian/patches/require-cuda.patch b/debian/patches/require-cuda.patch new file mode 100644 index 0000000..c4bc92a --- /dev/null +++ b/debian/patches/require-cuda.patch @@ -0,0 +1,33 @@ +Description: Require CUDA for OpenMP target + It makes little sense to have HERCULES compiler without CUDA offloading. + . + hercules-compiler (2018.7-1) unstable; urgency=medium + . + * Clean native build directory + * Update to the new compiler version published by ETHZ +Author: Michal Sojka + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2018-09-13 + +--- hercules-compiler-2018.7.orig/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake ++++ hercules-compiler-2018.7/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake +@@ -112,7 +112,7 @@ mark_as_advanced( + ################################################################################ + # Looking for CUDA... + ################################################################################ +-find_package(CUDA QUIET) ++find_package(CUDA REQUIRED) + + set(LIBOMPTARGET_DEP_CUDA_FOUND ${CUDA_FOUND}) + set(LIBOMPTARGET_DEP_CUDA_LIBRARIES ${CUDA_LIBRARIES}) diff --git a/debian/patches/series b/debian/patches/series index 3825761..de24417 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ configuration.patch Guard-architecture-dependent-code-with-#ifdefs.patch +require-cuda.patch -- 2.39.2