[CMAKE] Remove obsolete 'GCC_VERSION' checks (#2962)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Sat, 4 Jul 2020 13:33:50 +0000 (15:33 +0200)
committerGitHub <noreply@github.com>
Sat, 4 Jul 2020 13:33:50 +0000 (15:33 +0200)
following upgrade to RosBE 2.2.0 support and GCC 8.4.

modules/rosapps/applications/devutils/createspec/CMakeLists.txt
modules/rostests/winetests/advpack/CMakeLists.txt
modules/rostests/winetests/fusion/CMakeLists.txt
modules/rostests/winetests/msi/CMakeLists.txt
modules/rostests/winetests/msvcrt/CMakeLists.txt
modules/rostests/winetests/services/CMakeLists.txt
modules/rostests/winetests/setupapi/CMakeLists.txt
modules/rostests/winetests/shell32/CMakeLists.txt
modules/rostests/winetests/user32/CMakeLists.txt
modules/rostests/winetests/version/CMakeLists.txt
sdk/cmake/gcc.cmake

index 337bee7..a920eda 100644 (file)
@@ -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()
 
index fe6bc62..faca708 100644 (file)
@@ -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()
 
index 51bf979..a480519 100644 (file)
@@ -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()
 
index 05a4cc5..9b9ab15 100644 (file)
@@ -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()
 
index 45eae47..0114188 100644 (file)
@@ -1,5 +1,5 @@
 
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
     add_compile_flags("-Wno-format-overflow")
 endif()
 
index e150b01..d47b7f1 100644 (file)
@@ -1,5 +1,5 @@
 
-if(GCC AND GCC_VERSION VERSION_GREATER 7)
+if(GCC)
     add_compile_flags("-Wno-format-overflow")
 endif()
 
index 16b70d4..3b3451c 100644 (file)
@@ -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()
 
index 331418d..dd7bdac 100644 (file)
@@ -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()
 
index c4c6f06..ccc7efa 100644 (file)
@@ -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()
 
index 92d6483..1abe186 100644 (file)
@@ -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")