add support for nvhpc compiler #16
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces the necessary changes to add build support for the NVIDIA HPC SDK (NVHPC) compilers. The NVHPC suite enforces stricter type constraints and highlighted some version-dependent API usage that required updates for full compatibility.
Code Changes
Stricter Type Enforcement: The NVHPC compiler does not allow certain implicit pointer conversions that other compilers permit. To resolve this, explicit casts and gsl::not_null wrappers have been added where Type_Provider pointers are used, ensuring type safety and satisfying the compiler.
HDF5 API Compatibility: Updated the HDF5 backend to handle API changes across different library versions. Based on the HDF5 documentation, the code now uses a preprocessor check to call the modern H5Lvisit2 and H5Literate2 functions for HDF5 versions 1.12.0 and higher, while maintaining backward compatibility with older versions.
Missing Linker Dependency: Added find_package(EXPAT REQUIRED) to the main CMakeLists.txt and linked the ioda_engines target against EXPAT::EXPAT. This resolves a linking error caused by a missing dependency.
Changes In gsl-lite
Please refer to the link gsl-lite/gsl-lite#359 for changes required in gsl-lite.