Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templated MD arrays #39

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ target_compile_features(${POCLIB}
cxx_std_14
)

#NOTE this option is done downstream, maybe poc should control it
set(with_cxx "$<COMPILE_LANGUAGE:CXX>")
set(ps_kokkos "$<BOOL:${PORTABILITY_STRATEGY_KOKKOS}>")

target_compile_options(${POCLIB}
INTERFACE
$<${with_cxx}:$<${ps_kokkos}:--expt-relaxed-constexpr>>)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the event of +kokkos~cuda, wouldn't this result in a compile error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it, but POC doesn't have a USE_CUDA or similar like singularity-eos does, so I need to probe which compiler is being used.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how I've done it in other projects:

  get_target_property(kokkos_link_libs Kokkos::kokkoscore
                      INTERFACE_LINK_LIBRARIES)
  string(REGEX MATCH "CUDA"
         kokkos_has_cuda_libs "${kokkos_link_libs}")
  ...
  if(kokkos_has_cuda_libs)
    do cuda stuff...
  endif()


# TESTING
# ----------------------------------------
if(PORTS_OF_CALL_BUILD_TESTING)
Expand Down
Loading
Loading