Browse Source

Silence warnings in compilers without [[noreturn]]

pull/7529/head
Gleb Mazovetskiy 1 year ago
parent
commit
769bff52d3
  1. 7
      CMake/platforms/android.cmake
  2. 7
      CMake/platforms/xbox_nxdk.cmake

7
CMake/platforms/android.cmake

@ -29,3 +29,10 @@ set(UBSAN OFF)
# Disable in-game options to exit the game.
set(NOEXIT ON)
# NDK C++ compiler does not support [[noreturn]], leading to lots of warnings like this:
#
# warning: non-void function does not return a value in all control paths
#
# Silence them.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type")

7
CMake/platforms/xbox_nxdk.cmake

@ -20,3 +20,10 @@ set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
# nxdk C++ compiler does not support [[noreturn]], leading to lots of warnings like this:
#
# warning: non-void function does not return a value in all control paths
#
# Silence them.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type")

Loading…
Cancel
Save