Add support for WebAssembly
We are starting a project that is going to be written in C++ and compiled as both a desktop application and a WebAssembly (WASM) application, and it would be nice to be able to use CMake to compile both without having to do lots of wrangling with custom commands. I suspect that others are going to want to do the same thing as WASM becomes more popular. Therefore, I would like to propose that we add some sort of WASM support to CMake.
The most popular WebAssembly compiler seems to be Emscripten, which is based on Clang, which, as I understand it, is supported by CMake. However, Emscripten generates its own output format, and I'm wondering how if this could be made to work with the existing cross-compile infrastructure, or if we'd have to add support for a new target architecture.