Skip to content

Commit

Permalink
Suppress some warnings only on old GCC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fwojcik committed Nov 29, 2023
1 parent 06229a6 commit c142d7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(ACTUAL_GCC TRUE)

# GCC versions before 9.0 don't handle _Pragma for ignoring -Wvla :-(
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla")
endif()

# For my development system
if(EXISTS "${CMAKE_SOURCE_DIR}/.devbox")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf-4 -fvar-tracking-assignments")
Expand Down

0 comments on commit c142d7a

Please sign in to comment.