summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/mercury/fix-cmake-3.15-check_symbol_exists.patch30
-rw-r--r--var/spack/repos/builtin/packages/mercury/package.py4
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mercury/fix-cmake-3.15-check_symbol_exists.patch b/var/spack/repos/builtin/packages/mercury/fix-cmake-3.15-check_symbol_exists.patch
new file mode 100644
index 0000000000..dd28ae0eff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mercury/fix-cmake-3.15-check_symbol_exists.patch
@@ -0,0 +1,30 @@
+diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
+index 69d1dfab..88746473 100644
+--- a/src/util/CMakeLists.txt
++++ b/src/util/CMakeLists.txt
+@@ -16,6 +16,7 @@ set(MERCURY_UTIL_BUILD_INCLUDE_DEPENDENCIES
+ # External dependencies
+ #------------------------------------------------------------------------------
+ include(CheckIncludeFiles)
++include(CheckSymbolExists)
+ include(CheckTypeSize)
+
+ # Threads
+@@ -35,7 +36,7 @@ if(CMAKE_USE_PTHREADS_INIT)
+ check_type_size(PTHREAD_MUTEX_ADAPTIVE_NP HG_UTIL_HAS_PTHREAD_MUTEX_ADAPTIVE_NP)
+
+ # Detect pthread_condattr_setclock
+- CHECK_SYMBOL_EXISTS(pthread_condattr_setclock pthread.h HG_UTIL_HAS_PTHREAD_CONDATTR_SETCLOCK)
++ check_symbol_exists(pthread_condattr_setclock pthread.h HG_UTIL_HAS_PTHREAD_CONDATTR_SETCLOCK)
+ endif()
+
+ # Rt
+@@ -57,7 +58,7 @@ mark_as_advanced(MERCURY_USE_MONOTONIC_CLOCK)
+ check_include_files("time.h" HG_UTIL_HAS_TIME_H)
+ if(HG_UTIL_HAS_TIME_H)
+ # Detect clock_gettime
+- CHECK_SYMBOL_EXISTS(clock_gettime time.h HG_UTIL_HAS_CLOCK_GETTIME)
++ check_symbol_exists(clock_gettime time.h HG_UTIL_HAS_CLOCK_GETTIME)
+ endif()
+
+ # Detect <sys/time.h>
diff --git a/var/spack/repos/builtin/packages/mercury/package.py b/var/spack/repos/builtin/packages/mercury/package.py
index 87abf1069e..d6eb21cb40 100644
--- a/var/spack/repos/builtin/packages/mercury/package.py
+++ b/var/spack/repos/builtin/packages/mercury/package.py
@@ -52,6 +52,10 @@ class Mercury(CMakePackage):
conflicts('+ofi', when='@:0.9') # libfabric support was added in 1.0.0
conflicts('~ofi', when='+udreg') # udreg option is specific to OFI
+ # Fix CMake check_symbol_exists
+ # See https://github.com/mercury-hpc/mercury/issues/299
+ patch('fix-cmake-3.15-check_symbol_exists.patch', when='@:1.0.1')
+
def cmake_args(self):
"""Populate cmake arguments for Mercury."""
spec = self.spec