https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aae5cd8ea245f27e4d7a3…
commit aae5cd8ea245f27e4d7a344528103dc331b06f5c
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Sat Jul 4 15:33:50 2020 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Jul 4 15:33:50 2020 +0200
[CMAKE] Remove obsolete 'GCC_VERSION' checks (#2962)
following upgrade to RosBE 2.2.0 support and GCC 8.4.
---
.../rosapps/applications/devutils/createspec/CMakeLists.txt | 2 +-
modules/rostests/winetests/advpack/CMakeLists.txt | 2 +-
modules/rostests/winetests/fusion/CMakeLists.txt | 2 +-
modules/rostests/winetests/msi/CMakeLists.txt | 2 +-
modules/rostests/winetests/msvcrt/CMakeLists.txt | 2 +-
modules/rostests/winetests/services/CMakeLists.txt | 2 +-
modules/rostests/winetests/setupapi/CMakeLists.txt | 2 +-
modules/rostests/winetests/shell32/CMakeLists.txt | 2 +-
modules/rostests/winetests/user32/CMakeLists.txt | 2 +-
modules/rostests/winetests/version/CMakeLists.txt | 2 +-
sdk/cmake/gcc.cmake | 12 +++---------
11 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/modules/rosapps/applications/devutils/createspec/CMakeLists.txt
b/modules/rosapps/applications/devutils/createspec/CMakeLists.txt
index 670c1d749b2..fbd6692604c 100644
--- a/modules/rosapps/applications/devutils/createspec/CMakeLists.txt
+++ b/modules/rosapps/applications/devutils/createspec/CMakeLists.txt
@@ -1,5 +1,5 @@
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-stringop-overflow")
endif()
diff --git a/modules/rostests/winetests/advpack/CMakeLists.txt
b/modules/rostests/winetests/advpack/CMakeLists.txt
index 337bee72c24..a920eda6d06 100644
--- a/modules/rostests/winetests/advpack/CMakeLists.txt
+++ b/modules/rostests/winetests/advpack/CMakeLists.txt
@@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS)
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/fusion/CMakeLists.txt
b/modules/rostests/winetests/fusion/CMakeLists.txt
index fe6bc62c80a..faca708e42e 100644
--- a/modules/rostests/winetests/fusion/CMakeLists.txt
+++ b/modules/rostests/winetests/fusion/CMakeLists.txt
@@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS)
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/msi/CMakeLists.txt
b/modules/rostests/winetests/msi/CMakeLists.txt
index 51bf9791558..a480519bbcb 100644
--- a/modules/rostests/winetests/msi/CMakeLists.txt
+++ b/modules/rostests/winetests/msi/CMakeLists.txt
@@ -8,7 +8,7 @@ if(MSVC_IDE)
include_directories($<TARGET_FILE_DIR:custom>)
endif()
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/msvcrt/CMakeLists.txt
b/modules/rostests/winetests/msvcrt/CMakeLists.txt
index 05a4cc555d9..9b9ab157cc7 100644
--- a/modules/rostests/winetests/msvcrt/CMakeLists.txt
+++ b/modules/rostests/winetests/msvcrt/CMakeLists.txt
@@ -4,7 +4,7 @@ add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE
-D__msvcrt_ulong=ULONG)
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-stringop-truncation")
endif()
diff --git a/modules/rostests/winetests/services/CMakeLists.txt
b/modules/rostests/winetests/services/CMakeLists.txt
index 45eae4795f8..01141885072 100644
--- a/modules/rostests/winetests/services/CMakeLists.txt
+++ b/modules/rostests/winetests/services/CMakeLists.txt
@@ -1,5 +1,5 @@
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/setupapi/CMakeLists.txt
b/modules/rostests/winetests/setupapi/CMakeLists.txt
index e150b012597..d47b7f1c282 100644
--- a/modules/rostests/winetests/setupapi/CMakeLists.txt
+++ b/modules/rostests/winetests/setupapi/CMakeLists.txt
@@ -1,5 +1,5 @@
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/shell32/CMakeLists.txt
b/modules/rostests/winetests/shell32/CMakeLists.txt
index 16b70d40abe..3b3451c8343 100644
--- a/modules/rostests/winetests/shell32/CMakeLists.txt
+++ b/modules/rostests/winetests/shell32/CMakeLists.txt
@@ -3,7 +3,7 @@ add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG)
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")
endif()
diff --git a/modules/rostests/winetests/user32/CMakeLists.txt
b/modules/rostests/winetests/user32/CMakeLists.txt
index 331418d21a3..dd7bdac6051 100644
--- a/modules/rostests/winetests/user32/CMakeLists.txt
+++ b/modules/rostests/winetests/user32/CMakeLists.txt
@@ -5,7 +5,7 @@ add_definitions(-DWINVER=0x602 -D_WIN32_WINNT=0x602)
if(MSVC)
# Disable warning C4477 (printf format warnings)
add_compile_flags("/wd4477")
-elseif(GCC AND GCC_VERSION VERSION_GREATER 7)
+elseif(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/modules/rostests/winetests/version/CMakeLists.txt
b/modules/rostests/winetests/version/CMakeLists.txt
index c4c6f065895..ccc7efa6d8d 100644
--- a/modules/rostests/winetests/version/CMakeLists.txt
+++ b/modules/rostests/winetests/version/CMakeLists.txt
@@ -1,7 +1,7 @@
add_definitions(-DUSE_WINE_TODOS)
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
add_compile_flags("-Wno-format-overflow")
endif()
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 92d648321d4..1abe186c702 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -44,12 +44,8 @@ add_compile_flags("-pipe -fms-extensions
-fno-strict-aliasing")
# Prevent GCC from searching any of the default directories
add_compile_flags("-nostdinc")
-if(GCC_VERSION VERSION_GREATER 4.7)
- add_compile_flags("-mstackrealign")
-endif()
-if(NOT GCC_VERSION VERSION_LESS 4.8)
- add_compile_flags("-fno-aggressive-loop-optimizations")
-endif()
+add_compile_flags("-mstackrealign")
+add_compile_flags("-fno-aggressive-loop-optimizations")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_flags_language("-std=gnu99 -Wno-microsoft" "C")
@@ -112,9 +108,7 @@ endif()
add_compile_flags("-Wall -Wpointer-arith")
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")
-endif()
+add_compile_flags("-Wno-unused-const-variable")
add_compile_flags("-Wno-unused-local-typedefs")
add_compile_flags("-Wno-deprecated")