Skip to content

Commit

Permalink
[CI][CMake] Add support for gcc version 14
Browse files Browse the repository at this point in the history
  • Loading branch information
AMS21 committed May 18, 2024
1 parent 0b266ea commit 6c2ee55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
- { os: ubuntu-20.04, compiler_version: "11" }
- { os: ubuntu-22.04, compiler_version: "12" }
- { os: ubuntu-22.04, compiler_version: "13" }
- { os: ubuntu-24.04, compiler_version: "14" }

build_type:
- "Debug"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
- "11"
- "12"
- "13"
- "14"

build_type:
- "Debug"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/SetupEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ echo "UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1:halt_on_error=1" >>"$

# Latest versions
echo "LATEST_LLVM_VERSION=18" >>"$GITHUB_ENV"
echo "LATEST_GCC_VERSION=13" >>"$GITHUB_ENV"
echo "LATEST_GCC_VERSION=14" >>"$GITHUB_ENV"

if [[ $machine == "linux" ]]; then
# Workaround for the unreliable Github Actions caching proxy
Expand Down
9 changes: 7 additions & 2 deletions scripts/cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ elseif(PHI_COMPILER_GCC)
set(phi_cxx_common_flags -fsized-deallocation -fconcepts)
set(phi_color_diagnostics_flag -fdiagnostics-color)
set(phi_disable_all_warnings_flag -w)
set(phi_debug_flags -fasynchronous-unwind-tables -fcheck-new -fvar-tracking
-fvar-tracking-assignments -grecord-gcc-switches)
set(phi_debug_flags -fasynchronous-unwind-tables -fcheck-new -fvar-tracking-assignments
-grecord-gcc-switches)
set(phi_debug_only_flags)
set(phi_coverage_compile_flags -fno-common -fno-inline -fno-default-inline -fno-inline-functions
-fno-omit-frame-pointer)
Expand Down Expand Up @@ -640,6 +640,11 @@ elseif(PHI_COMPILER_GCC)
-ftrivial-auto-var-init=pattern)
endif()

# GCC-14 flags
if(PHI_GCC_VERSION VERSION_GREATER_EQUAL 14)
set(phi_cxx_warning_flags ${phi_cxx_warning_flags} -Wnrvo)
endif()

elseif(PHI_COMPILER_MSVC)

set(phi_warning_flags /Wall)
Expand Down

0 comments on commit 6c2ee55

Please sign in to comment.