diff --git a/CMakeLists.txt b/CMakeLists.txt index f63d9028..04cfc177 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.24) project(FlyCube) if (CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS") diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake index 929d07fb..e309ec48 100644 --- a/cmake/compiler_settings.cmake +++ b/cmake/compiler_settings.cmake @@ -1,12 +1,27 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_COMPILE_WARNING_AS_ERROR ON) if (MSVC) add_compile_options("/MP") add_definitions(-DUNICODE -D_UNICODE) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-DNOMINMAX) + add_compile_options( + /wd4005 + /wd4715 + /wd4834 + /wd4838 + ) +else() + add_compile_options( + $<$:-Wno-deprecated-declarations> + $<$:-Wno-shorten-64-to-32> + $<$:-Wno-switch> + $<$:-Wno-unguarded-availability-new> + $<$:-Wno-unused-result> + ) endif() if (CMAKE_SYSTEM_NAME STREQUAL "iOS")