diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ec1e97a3f9..a5c99c623a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -177,6 +177,9 @@ else() $<$:-Wno-invalid-offsetof> $<$:-Wno-unused-parameter> $<$:-Wno-missing-field-initializers>) + if (NOT IOS) + add_compile_options($<$:-Werror=missing-declarations>) + endif() if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++ if (NOT MSVC)