Skip to content

Commit

Permalink
KokkosComm_configuration.hpp
Browse files Browse the repository at this point in the history
Set KokkosComm in this generated header file

KokkosComm Version informations are also located there.
  • Loading branch information
cedricchevalier19 committed Apr 9, 2024
1 parent fd52679 commit 07fad7f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ set(KOKKOSCOMM_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR} CACHE STRING "" FORC
set(KOKKOSCOMM_VERSION_MINOR ${CMAKE_PROJECT_VERSION_MINOR} CACHE STRING "" FORCE)
set(KOKKOSCOMM_VERSION_PATCH ${CMAKE_PROJECT_VERSION_PATCH} CACHE STRING "" FORCE)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/cmake/KokkosComm_version.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/src/KokkosComm_version.hpp
${CMAKE_CURRENT_LIST_DIR}/cmake/KokkosComm_configuration.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/src/KokkosComm_configuration.hpp
@ONLY
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
#define KOKKOSCOMM_VERSION_MAJOR @KOKKOSCOMM_VERSION_MAJOR@
#define KOKKOSCOMM_VERSION_MINOR @KOKKOSCOMM_VERSION_MINOR@
#define KOKKOSCOMM_VERSION_PATCH @KOKKOSCOMM_VERSION_PATCH@

#cmakedefine KOKKOSCOMM_ENABLE_MDSPAN
#cmakedefine KOKKOSCOMM_USE_STD_MDSPAN
#cmakedefine KOKKOSCOMM_USE_KOKKOS_MDSPAN
#cmakedefine KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL
11 changes: 0 additions & 11 deletions cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ check_and_add_flag(KokkosCommFlags -Wformat=2)
check_and_add_flag(KokkosCommFlags -Wmissing-include-dirs)
check_and_add_flag(KokkosCommFlags -Wno-gnu-zero-variadic-macro-arguments)

# mdspan-related definitions
if (KOKKOSCOMM_ENABLE_MDSPAN)
target_compile_definitions(KokkosCommFlags INTERFACE KOKKOSCOMM_ENABLE_MDSPAN)
if (KOKKOSCOMM_USE_STD_MDSPAN)
target_compile_definitions(KokkosCommFlags INTERFACE KOKKOSCOMM_USE_STD_MDSPAN)
elseif (KOKKOSCOMM_USE_KOKKOS_MDSPAN)
target_compile_definitions(KokkosCommFlags INTERFACE KOKKOSCOMM_USE_KOKKOS_MDSPAN)
target_compile_definitions(KokkosCommFlags INTERFACE KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL)
endif ()
endif ()

# choose cxx standard
set_target_properties(KokkosCommFlags PROPERTIES CXX_EXTENSIONS OFF)
if (KOKKOSCOMM_ENABLE_MDSPAN AND KOKKOSCOMM_USE_STD_MDSPAN)
Expand Down
3 changes: 2 additions & 1 deletion src/KokkosComm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

#pragma once

#include "KokkosComm_configuration.hpp"

#include "KokkosComm_collective.hpp"
#include "KokkosComm_version.hpp"
#include "KokkosComm_isend.hpp"
#include "KokkosComm_recv.hpp"
#include "KokkosComm_send.hpp"
Expand Down

0 comments on commit 07fad7f

Please sign in to comment.