'Only clang-cl is supported on Windows when building project with webrtc

I am trying to build a project that contains webrtc. However compilation fails with this error : vendor\webrtc\src\base/compiler_specific.h(11,1): fatal error C1189: #error: "Only clang-cl is supported on Windows, see https://crbug.com/988071". I have tried defining __clang__ preprocessor definition, but this simply causes an error :
STL1000: Unexpected compiler version, expected Clang 11 or newer. I am using cmake with Visual Studio 2019 generator. I have installed clang-cl , both independently and as part as Visual Studio Build Tools and I have tried overwriting the path to the clang-cl executable. I am aware this is a duplicate of Only clang-cl is supported on Windows, when I compile my webrtc server, but there was no conclusive answer on that issue. Am i missing something obvious? Thanks in advance



Solution 1:[1]

It turns out I have to specify the toolset in CMake with the -T option : cmake -G "Visual Studio 2019" -T ClangCl ...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mustapha