Skip to content

Commit

Permalink
Require a C++11 compiler to build the C++ wrappers (HDFGroup#693)
Browse files Browse the repository at this point in the history
* Committing clang-format changes

* Requires a C++11 compiler to build the C++ wrappers

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
derobins and github-actions[bot] committed May 28, 2021
1 parent d511582 commit 7a6de6e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 1 addition & 13 deletions config/clang-cxxflags
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then
;;
esac

case "$host_os-$host_cpu" in
# cygwin needs the "-std=c99" flag removed, so make
# a specific case for Cygwin without the flag and a default
# case to add the flag everywhere else
cygwin-*)
;;

*)
H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11"
;;
esac

H5_CXXFLAGS="$H5_CXXFLAGS $arch"
H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11"

##############
# Production #
Expand Down
2 changes: 1 addition & 1 deletion config/cmake/HDFCXXCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
2 changes: 1 addition & 1 deletion config/gnu-cxxflags
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
esac

# C++-specific
H5_CXXFLAGS="$H5_CXXFLAGS $arch"
H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11"

##############
# Production #
Expand Down
12 changes: 12 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ New Features

Configuration:
-------------
- A C++11-compliant compiler is now required to build the C++ wrappers

CMAKE_CXX_STANDARD is now set to 11 when building with CMake and
-std=c++11 is added when building with clang/gcc via the Autotools.

(DER - 2021/05/27)


- CMake will now run the shell script tests in test/ by default

(DER - 2021/05/27)

- CMake option to link the generated Fortran MOD files into the include
directory.

Expand Down

0 comments on commit 7a6de6e

Please sign in to comment.