vcpkg/ports/proj/fix-gcc-version-less-8.patch
Tom Willow 485225516a
[proj] fix gcc version<8 compile (#39578)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2024-07-01 16:01:08 -04:00

20 lines
584 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36afe1156..14287744d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,9 +63,13 @@ if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(PROJ_C_WARN_FLAGS ${PROJ_common_WARN_FLAGS}
-Wmissing-prototypes
)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8)
+ set(PROJ_CXX_WARN_FLAGS ${PROJ_common_WARN_FLAGS}
+ -Wextra-semi
+ )
+ endif()
set(PROJ_CXX_WARN_FLAGS ${PROJ_common_WARN_FLAGS}
-Weffc++
- -Wextra-semi
# -Wold-style-cast
-Woverloaded-virtual
-Wzero-as-null-pointer-constant