Skip to content

Commit

Permalink
Silenced CMake deprecation errors when building for Android (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihe authored Nov 15, 2024
1 parent dfbf40e commit 80dac65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/toolchains/android/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 21)
set(CMAKE_ANDROID_STL_TYPE c++_static)
set(CMAKE_ANDROID_EXCEPTIONS FALSE)

# HACK(mihe): CMake 3.31 dropped support for projects compatible with CMake versions older than
# 3.10, which breaks the Android NDK, since it declares 3.6 as its minimum version. So we just
# disable deprecation warnings altogether.
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
set(CMAKE_ERROR_DEPRECATED OFF CACHE BOOL "" FORCE)

0 comments on commit 80dac65

Please sign in to comment.