Skip to content

CMake: centralize target language standard requirements - #3512

Open
agourakis82 wants to merge 1 commit into
boutproject:nextfrom
agourakis82:fix/3502-target-language-standards
Open

agourakis82 wants to merge 1 commit into
boutproject:nextfrom
agourakis82:fix/3502-target-language-standards

Conversation

@agourakis82

Copy link
Copy Markdown

Fixes #3502.

Centralize the C++20 minimum in a target-local helper shared by CXX, CUDA and
HIP. Preserve newer standards selected by callers and require the selected
standard instead of allowing silent fallback. Remove the global HIP standard
defaults and duplicate per-target settings.

Add CMake regression tests for the minimum, preservation of C++23, older
standards (including C++98), and unchanged directory defaults/unrelated targets.
Keep the library's public C++20 compile-feature requirement.

Validation:

  • Full CPU library and serial unit-test executable built with GCC 15.2 in
    C++23 mode; all three CTest entries passed. NetCDF and PVODE enabled;
    optional FFTW, LAPACK and SUNDIALS disabled in this profile.
  • Real CUDA helper probes compiled with NVCC 12.9.86 (C++20) and Clang 18.1.8
    (C++23).
  • Real HIP helper probes compiled with ROCm 7.2.4 / AMD Clang 22.0.0git:
    requested C++17 raised to C++20, and requested C++23 preserved.
  • GPU probes checked both compiler flags and compile-time language macros.

CUDA/HIP validation is compile-only for the helper, not a full BOUT++ GPU
library build or GPU execution. No solver or physics changes.

@agourakis82

Copy link
Copy Markdown
Author

The Read the Docs status links to build 35073848 at this PR's exact head, 7b486720. Its public API reports cancelled, duration 0, and notifications for inactivity termination and manual cancellation; it does not report a compiler or Sphinx error.

Could a maintainer restart the documentation build and approve the held GitHub Actions runs? The cancelled build does not provide a documentation validation result for this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set C++/CUDA/HIP standards consistently

1 participant