Skip to content

Commit

Permalink
patch proj warning for gcc<8
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxxen committed Aug 28, 2024
1 parent ce101d7 commit 73c4242
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions deps/patches/gcc_warn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- CMakeLists.txt 2024-08-28 12:32:22
+++ CMakeLists.txt 2024-08-28 12:32:42
@@ -54,7 +54,7 @@
-Wswitch
-Wunused-parameter
)
-if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
set(PROJ_common_WARN_FLAGS ${PROJ_common_WARN_FLAGS}
-Wduplicated-cond
-Wduplicated-branches
11 changes: 11 additions & 0 deletions deps/patches/gcc_warn_wasm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- CMakeLists.txt 2024-08-28 12:32:22
+++ CMakeLists.txt 2024-08-28 12:32:42
@@ -54,7 +54,7 @@
-Wswitch
-Wunused-parameter
)
-if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
set(PROJ_common_WARN_FLAGS ${PROJ_common_WARN_FLAGS}
-Wduplicated-cond
-Wduplicated-branches

0 comments on commit 73c4242

Please sign in to comment.