Skip to content

Commit

Permalink
Merge pull request #136 from bettiolm/atlas_gt_storage
Browse files Browse the repository at this point in the history
Atlas field with GridTools storage backend
  • Loading branch information
boeschf authored Dec 9, 2021
2 parents 47bb4d4 + f57562e commit c159466
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 215 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ if (GHEX_ENABLE_ATLAS_BINDINGS)
find_package(Atlas REQUIRED HINTS ${Atlas_DIR})
# Temporary workaround to fix missing dependency in Atlas target: eckit
target_link_libraries(atlas INTERFACE eckit)
set(GHEX_ATLAS_GT_STORAGE_CPU_BACKEND "KFIRST" CACHE STRING "GridTools CPU storage traits: KFIRST | IFIRST.")
set_property(CACHE GHEX_ATLAS_GT_STORAGE_CPU_BACKEND PROPERTY STRINGS "KFIRST" "IFIRST")
endif()

set(GHEX_BUILD_TESTS OFF CACHE BOOL "True if tests shall be built")
Expand All @@ -151,6 +153,11 @@ if (GHEX_USE_XPMEM)
endif()
if (GHEX_ENABLE_ATLAS_BINDINGS)
target_link_libraries(ghexlib INTERFACE atlas)
if (GHEX_ATLAS_GT_STORAGE_CPU_BACKEND STREQUAL "KFIRST")
target_compile_definitions(ghexlib INTERFACE GHEX_ATLAS_GT_STORAGE_CPU_BACKEND_KFIRST)
elseif(GHEX_ATLAS_GT_STORAGE_CPU_BACKEND STREQUAL "IFIRST")
target_compile_definitions(ghexlib INTERFACE GHEX_ATLAS_GT_STORAGE_CPU_BACKEND_IFIRST)
endif()
endif()
target_link_libraries(ghexlib INTERFACE ${LIBRT})

Expand Down
Loading

0 comments on commit c159466

Please sign in to comment.