From: Maksym Mamontov <madf@madf.info>
Date: Tue, 28 Jan 2020 17:23:41 +0000 (+0200)
Subject: GCC version, warnings.
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/907166f270d246529788a6de7688f3e54847c0a2?ds=inline

GCC version, warnings.
---

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b03670a..9a75d732 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@ project ( Stargazer )
 
 set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 
-if ( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.2 )
-    message ( FATAL_ERROR "Require at least gcc-5.2" )
-endif( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.2 )
+if ( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.5 )
+    message ( FATAL_ERROR "Require at least gcc-6.5" )
+endif( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.5 )
 
 option ( BUILD_STG "Build Stargazer server." OFF )
 option ( BUILD_SGCONF "Build SGConf client." OFF )
diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
index 59caf2f1..8528b951 100644
--- a/libs/CMakeLists.txt
+++ b/libs/CMakeLists.txt
@@ -29,6 +29,7 @@ if ( BUILD_LIB_IA )
 endif ( BUILD_LIB_IA )
 
 if ( BUILD_LIB_IBPP )
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast -Wno-useless-cast")
     add_library ( ibpp STATIC ibpp/all_in_one.cpp )
     target_include_directories ( ibpp PUBLIC ibpp/include )
 endif ( BUILD_LIB_IBPP )