diff --git a/rehlds/CMakeLists.txt b/rehlds/CMakeLists.txt index 73fb168..33c5d1f 100644 --- a/rehlds/CMakeLists.txt +++ b/rehlds/CMakeLists.txt @@ -47,7 +47,11 @@ else() -Wno-sign-compare -Wno-strict-aliasing -Wno-ignored-attributes") if (NOT USE_CLANG_COMPILER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-truncation -Wno-format-truncation -Wno-unused-but-set-variable -Wno-class-memaccess") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable") + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-truncation -Wno-format-truncation -Wno-class-memaccess") + endif() endif() endif() diff --git a/rehlds/filesystem/FileSystem_Stdio/CMakeLists.txt b/rehlds/filesystem/FileSystem_Stdio/CMakeLists.txt index ab6c8bc..72b486e 100644 --- a/rehlds/filesystem/FileSystem_Stdio/CMakeLists.txt +++ b/rehlds/filesystem/FileSystem_Stdio/CMakeLists.txt @@ -42,7 +42,7 @@ else() -Wno-unknown-pragmas -Wno-unused-result -Wno-unused-variable -Wno-unused-function\ -Wno-write-strings -Wno-sign-compare") - if (NOT USE_CLANG_COMPILER) + if (NOT USE_CLANG_COMPILER AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-truncation -Wno-class-memaccess") endif() endif()