Skip to content

Commit

Permalink
Compile warning as error
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejnau committed Aug 4, 2024
1 parent 577507d commit 6a266ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
15 changes: 15 additions & 0 deletions cmake/compiler_settings.cmake
Original file line number Diff line number Diff line change
@@ -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(
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-declarations>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-shorten-64-to-32>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-switch>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-unguarded-availability-new>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-unused-result>
)
endif()

if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
Expand Down

0 comments on commit 6a266ed

Please sign in to comment.