Skip to content

Commit

Permalink
I give up
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Sep 25, 2024
1 parent 7781754 commit e5119b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
2 changes: 2 additions & 0 deletions cmake/SetupDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
10 changes: 3 additions & 7 deletions cmake/SetupFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,18 @@ 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
>
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}
Expand Down
4 changes: 4 additions & 0 deletions cmake/SetupOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit e5119b6

Please sign in to comment.