Skip to content

Commit

Permalink
[C/C++] Add GCC 11 to the build matrix (aeron-io#1214)
Browse files Browse the repository at this point in the history
* [CMake] Add `-Wno-error=maybe-uninitialized` to teh compiler flags to allow compiling on gcc 11 with Googletest 1.10.0.

* [CI] Add gcc 11 to the build matrix.

* [CMake] Add GoogleTest dependency directly from the repo as it now follows 'Live at HEAD' philosophy and there will no longer be any releases + the upgrade is necessary for gcc 11 compatibility.

* Revert "[CMake] Add `-Wno-error=maybe-uninitialized` to teh compiler flags to allow compiling on gcc 11 with Googletest 1.10.0."

This reverts commit d1277b4.

* Revert "Revert "[CMake] Add `-Wno-error=maybe-uninitialized` to teh compiler flags to allow compiling on gcc 11 with Googletest 1.10.0.""

This reverts commit c2a90e1.

* [CMake] Add `-Wno-error=maybe-uninitialized` for GCC 11 if it is before 11.2 release.

* Revert "[CMake] Add GoogleTest dependency directly from the repo as it now follows 'Live at HEAD' philosophy and there will no longer be any releases + the upgrade is necessary for gcc 11 compatibility."

This reverts commit 9d9c7c1.

* [CMake] Fix end of the block.

* [CI] Use `impish` repo to install GCC 11.2 or higher.

* Revert "[CI] Use `impish` repo to install GCC 11.2 or higher."

This reverts commit 9895b7c.

* [CMake] Add `-Wno-error=maybe-uninitialized` for GCC 11 or higher. This is needed, because otherwise GoogleTest won't compile.
  • Loading branch information
vyazelenko authored Aug 26, 2021
1 parent 1af06b1 commit dd6cead
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-low-cadence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '10' ]
version: [ '11' ]
env:
CC: gcc-${{ matrix.version }}
CXX: g++-${{ matrix.version }}
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '10' ]
version: [ '11' ]
env:
CC: gcc-${{ matrix.version }}
CXX: g++-${{ matrix.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '6', '7', '8', '9', '10' ]
version: [ '6', '7', '8', '9', '10', '11' ]
env:
CC: gcc-${{ matrix.version }}
CXX: g++-${{ matrix.version }}
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ add_definitions(-DAERON_VERSION_PATCH=${aeron_VERSION_PATCH})
if (UNIX)
add_compile_options(-Wall -Wpedantic -Wextra -Wno-unused-parameter)

if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "11.0")
add_compile_options(-Wno-error=maybe-uninitialized)
endif ()

if (C_WARNINGS_AS_ERRORS)
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Werror>)
endif (C_WARNINGS_AS_ERRORS)
Expand Down

0 comments on commit dd6cead

Please sign in to comment.