From 211df8b7b04fa1bce8e2ba4b151d73801b6af632 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 1 Oct 2021 11:08:02 -0400 Subject: [PATCH] Avoid assertions in PythonCapabilities check when using external KOKKOS --- unittest/python/python-capabilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittest/python/python-capabilities.py b/unittest/python/python-capabilities.py index 8f72c39670..4c14cac37d 100644 --- a/unittest/python/python-capabilities.py +++ b/unittest/python/python-capabilities.py @@ -166,9 +166,9 @@ class PythonCapabilities(unittest.TestCase): self.assertIn('single',settings['GPU']['precision']) if self.cmake_cache['PKG_KOKKOS']: - if self.cmake_cache['Kokkos_ENABLE_OPENMP']: + if 'Kokkos_ENABLE_OPENMP' in self.cmake_cache and self.cmake_cache['Kokkos_ENABLE_OPENMP']: self.assertIn('openmp',settings['KOKKOS']['api']) - if self.cmake_cache['Kokkos_ENABLE_SERIAL']: + if 'Kokkos_ENABLE_SERIAL' in self.cmake_cache and self.cmake_cache['Kokkos_ENABLE_SERIAL']: self.assertIn('serial',settings['KOKKOS']['api']) self.assertIn('double',settings['KOKKOS']['precision'])