diff --git a/.github/workflows/build-hpc.yml b/.github/workflows/build-hpc.yml index 740584e4e..41e7b3935 100644 --- a/.github/workflows/build-hpc.yml +++ b/.github/workflows/build-hpc.yml @@ -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: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2c9fa7db..62569de89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/pluto/CMakeLists.txt b/pluto/CMakeLists.txt index 8dad87aca..835e3f315 100644 --- a/pluto/CMakeLists.txt +++ b/pluto/CMakeLists.txt @@ -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 )