FindMatlab: mex version file may generate warning for missing prototype
FindMatlab's `matlab_add_mex` adds `c_mexapi_version.c` or `cpp_mexapi_version.cpp` to a declared mex function. If that CMake target has warnings for missing prototypes, the build process emits warnings for the version file. Since that C or C++ file is out of scope for the CMake project, I would propose to declare a static library or an object library with minimal warnings and link it to the mex function. Alternatively, we could add `-Wno-missing-prototypes` (C or Clang), `-Wno-missing-declarations` (GCC) to the source file's `COMPILE_OPTIONS` to silence this warning.
issue