Suppress "System is unknown to cmake" warning

I wrote a toolchain file for a proprietary platform covered by NDAs.
I was looking for a way to suppress the following warning that I can embed in the toolchain file itself.

This warning is for project developers.  Use -Wno-dev to suppress it.

System is unknown to cmake, create:
Platform/REDACTED to use this system, please post your config file on discourse.cmake.org so it can be added to cmake

I believe you’ll need to provide a suitable Platform/Foo.cmake module as well. You might be able to use the Generic platform as an alternative?

I cannot use Generic as there are many of these platforms.

Is there any documentation of what should go into the platform module besides the system name? Pointer sizes?

I’d look at CMake’s shipped platform files and try to follow what they do. Documentation is lacking, but adding some based on your experiences doing so would be welcome.

1 Like