From 2bcfa51770ba1feefc8b8573d0a4ee4e3a5bd928 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Wed, 17 May 2023 09:55:28 -0400 Subject: [PATCH 1/3] Expand list of kokkos options not to export with cmake --- cmake/kokkos_functions.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/kokkos_functions.cmake b/cmake/kokkos_functions.cmake index 55b1ebbf81..9dab1ca00e 100644 --- a/cmake/kokkos_functions.cmake +++ b/cmake/kokkos_functions.cmake @@ -6,7 +6,12 @@ # upper-case version for use within set(Kokkos_OPTIONS_NOT_TO_EXPORT - Kokkos_ENABLE_TESTS Kokkos_ENABLE_EXAMPLES) + Kokkos_ENABLE_BENCHMARKS + Kokkos_ENABLE_EXAMPLES + Kokkos_ENABLE_TESTS + Kokkos_ENABLE_HEADER_SELF_CONTAINMENT_TESTS + Kokkos_ENABLE_COMPILER_WARNINGS +) # # From c935774359fb04eecf39671d8882633aef477121 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Wed, 17 May 2023 09:56:11 -0400 Subject: [PATCH 2/3] Do not append to Kokkos_OPTIONS variables those in the do not export list --- cmake/kokkos_enable_options.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/kokkos_enable_options.cmake b/cmake/kokkos_enable_options.cmake index 96b9413999..bf7762e1dc 100644 --- a/cmake/kokkos_enable_options.cmake +++ b/cmake/kokkos_enable_options.cmake @@ -11,7 +11,7 @@ FUNCTION(KOKKOS_ENABLE_OPTION SUFFIX DEFAULT DOCSTRING) KOKKOS_OPTION(ENABLE_${SUFFIX} ${DEFAULT} BOOL ${DOCSTRING}) STRING(TOUPPER ${SUFFIX} UC_NAME) - IF (KOKKOS_ENABLE_${UC_NAME}) + IF (KOKKOS_ENABLE_${UC_NAME} AND NOT "Kokkos_ENABLE_${UC_NAME}" IN_LIST Kokkos_OPTIONS_NOT_TO_EXPORT) LIST(APPEND KOKKOS_ENABLED_OPTIONS ${UC_NAME}) #I hate that CMake makes me do this SET(KOKKOS_ENABLED_OPTIONS ${KOKKOS_ENABLED_OPTIONS} PARENT_SCOPE) From 3f565bbb5ebb6d88846e3ad9b9a2aa5248478b92 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Wed, 17 May 2023 17:01:28 -0400 Subject: [PATCH 3/3] Export Kokkos_ENABLE_