From e5119b6f3ff534306a82626bd28d6deca8397f42 Mon Sep 17 00:00:00 2001 From: Benjamin Ransom Ryan Date: Wed, 25 Sep 2024 13:12:37 -0600 Subject: [PATCH] I give up --- CMakeLists.txt | 1 + cmake/SetupDeps.cmake | 2 ++ cmake/SetupFlags.cmake | 10 +++------- cmake/SetupOptions.cmake | 4 ++++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfdfc9d..3fc17af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,3 +123,4 @@ feature_summary(WHAT ALL DESCRIPTION "Enabled Features:" VAR enabledFeaturesText) message(STATUS "${enabledFeaturesText}") +message(STATUS "NOW 127 Compile Definitions for ${PROJECT_NAME}: ${defs}") diff --git a/cmake/SetupDeps.cmake b/cmake/SetupDeps.cmake index 048d700..5196437 100644 --- a/cmake/SetupDeps.cmake +++ b/cmake/SetupDeps.cmake @@ -93,3 +93,5 @@ cmake_dependent_option(SINGULARITY_USE_MPI if (NOT TARGET Catch2::Catch2) find_package(Catch2 QUIET) endif() + +message(STATUS "NOW Compile Definitions for ${PROJECT_NAME}: ${defs}") diff --git a/cmake/SetupFlags.cmake b/cmake/SetupFlags.cmake index b491f8e..beaa533 100644 --- a/cmake/SetupFlags.cmake +++ b/cmake/SetupFlags.cmake @@ -63,13 +63,11 @@ INTERFACE > # with_kokkos ) -get_target_property(defs ${PROJECT_NAME} INTERFACE_COMPILE_DEFINITIONS) -message(STATUS "BEFORE compile Definitions for ${PROJECT_NAME}: ${defs}") target_compile_definitions(${PROJECT_NAME} INTERFACE - #$<${with_kokkos}: - # PORTABILITY_STRATEGY_KOKKOS - #> + $<${with_kokkos}: + PORTABILITY_STRATEGY_KOKKOS + > $<${without_kokkos}: $<${with_fmath}: SINGULARITY_USE_FMATH @@ -77,8 +75,6 @@ INTERFACE PORTABILITY_STRATEGY_NONE > ) -get_target_property(defs ${PROJECT_NAME} INTERFACE_COMPILE_DEFINITIONS) -message(STATUS "Compile Definitions for ${PROJECT_NAME}: ${defs}") # target_link_libraries brings in compile flags, compile defs, link flags. target_link_libraries(${PROJECT_NAME} diff --git a/cmake/SetupOptions.cmake b/cmake/SetupOptions.cmake index 21a857c..be18dc9 100644 --- a/cmake/SetupOptions.cmake +++ b/cmake/SetupOptions.cmake @@ -51,3 +51,7 @@ if(SINGULARITY_USE_CUDA) message(FATAL_ERROR "Cuda without kokkos is not currently supported") endif() endif() + +if(NOT SINGULARITY_USE_KOKKOS) + message(FATAL_ERROR "For unknown reasons PORTABILITY_STRATEGY_KOKKOS will always be provided to ports-of-call. For now you must use Kokkos with singularity-opac.") +endif()