Skip to content

Commit

Permalink
Add pluto option to enable compatibility with std::pmr, default OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 26, 2025
1 parent d6491a6 commit 844dd08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
- fftw
- qhull
- eigen
cmake_options: -DMPI_SLOTS=4 -DENABLE_WARNING_AS_ERROR=ON
cmake_options: -DMPI_SLOTS=4 -DENABLE_WARNING_AS_ERROR=ON -DENABLE_PMR=OFF
# ENABLE_PMR=OFF because the default host-compiler (gcc 8.5) is not std::pmr capable

runs-on: [self-hosted, linux, hpc]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ jobs:
dependency_cmake_options: |
ecmwf/eckit: "-G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTS=OFF -DENABLE_ECKIT_CMD=OFF -DENABLE_ECKIT_SQL=OFF -DENABLE_WARNINGS=OFF"
ecmwf/fckit: "-G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTS=OFF"
cmake_options: "-G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DATLAS_BITS_LOCAL=64 -DENABLE_WARNING_AS_ERROR=ON ${{ matrix.cmake_options }}"
cmake_options: "-G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DATLAS_BITS_LOCAL=64 -DENABLE_WARNING_AS_ERROR=ON -DENABLE_PMR=ON ${{ matrix.cmake_options }}"
ctest_options: "${{ matrix.ctest_options }}"

- name: Verify tools
Expand Down
14 changes: 2 additions & 12 deletions pluto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,8 @@ project( pluto VERSION ${atlas_VERSION} LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(PLUTO_HAVE_PMR 1)
### Normally we should be auto-detecting std::pmr (c++17) for polymorphic memory resource
# However, CUDA or HIP compiler seems to not find the right headers,
#  so for now we don't rely on it
#
# include(CheckIncludeFileCXX)
# check_include_file_cxx(memory_resource PLUTO_HAVE_PMR)
# if( PLUTO_HAVE_PMR )
# set( PLUTO_HAVE_PMR 1 )
# else()
# set( PLUTO_HAVE_PMR 0 )
# endif()
ecbuild_add_option( FEATURE PMR DESCRIPTION "Compatibility with std::pmr in C++" DEFAULT OFF )
set(PLUTO_HAVE_PMR ${HAVE_PMR})

find_package(hic QUIET)
if( NOT hic_FOUND )
Expand Down

0 comments on commit 844dd08

Please sign in to comment.