MinGW build configurations don't support this pragma (unless compiling with clang, with -fms-extensions, and linking with lld), and at least clang warns about it.
This library does end up linked by the cmake files anyway (as long as the check works properly).
(I guess this could be made to be handled by cmake as well, by generalizing the existing code for mingw?)