[CMAKE] Remove obsolete 'GCC_VERSION' checks (#2962)

following upgrade to RosBE 2.2.0 support and GCC 8.4.
This commit is contained in:
Serge Gautherie 2020-07-04 15:33:50 +02:00 committed by GitHub
parent 54e0dbe3b6
commit aae5cd8ea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 13 additions and 19 deletions

View file

@ -1,5 +1,5 @@
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-stringop-overflow") add_compile_flags("-Wno-stringop-overflow")
endif() endif()

View file

@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -8,7 +8,7 @@ if(MSVC_IDE)
include_directories($<TARGET_FILE_DIR:custom>) include_directories($<TARGET_FILE_DIR:custom>)
endif() endif()
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -4,7 +4,7 @@ add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-D__msvcrt_ulong=ULONG) -D__msvcrt_ulong=ULONG)
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-stringop-truncation") add_compile_flags("-Wno-stringop-truncation")
endif() endif()

View file

@ -1,5 +1,5 @@
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -1,5 +1,5 @@
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -3,7 +3,7 @@ add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG)
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -5,7 +5,7 @@ add_definitions(-DWINVER=0x602 -D_WIN32_WINNT=0x602)
if(MSVC) if(MSVC)
# Disable warning C4477 (printf format warnings) # Disable warning C4477 (printf format warnings)
add_compile_flags("/wd4477") add_compile_flags("/wd4477")
elseif(GCC AND GCC_VERSION VERSION_GREATER 7) elseif(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7) if(GCC)
add_compile_flags("-Wno-format-overflow") add_compile_flags("-Wno-format-overflow")
endif() endif()

View file

@ -44,12 +44,8 @@ add_compile_flags("-pipe -fms-extensions -fno-strict-aliasing")
# Prevent GCC from searching any of the default directories # Prevent GCC from searching any of the default directories
add_compile_flags("-nostdinc") add_compile_flags("-nostdinc")
if(GCC_VERSION VERSION_GREATER 4.7) add_compile_flags("-mstackrealign")
add_compile_flags("-mstackrealign") add_compile_flags("-fno-aggressive-loop-optimizations")
endif()
if(NOT GCC_VERSION VERSION_LESS 4.8)
add_compile_flags("-fno-aggressive-loop-optimizations")
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang") if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_flags_language("-std=gnu99 -Wno-microsoft" "C") add_compile_flags_language("-std=gnu99 -Wno-microsoft" "C")
@ -112,9 +108,7 @@ endif()
add_compile_flags("-Wall -Wpointer-arith") add_compile_flags("-Wall -Wpointer-arith")
add_compile_flags("-Wno-char-subscripts -Wno-multichar -Wno-unused-value") add_compile_flags("-Wno-char-subscripts -Wno-multichar -Wno-unused-value")
if(NOT GCC_VERSION VERSION_LESS 6.1) add_compile_flags("-Wno-unused-const-variable")
add_compile_flags("-Wno-unused-const-variable")
endif()
add_compile_flags("-Wno-unused-local-typedefs") add_compile_flags("-Wno-unused-local-typedefs")
add_compile_flags("-Wno-deprecated") add_compile_flags("-Wno-deprecated")