System is unknown to cmake, create: Platform/MINGW64_NT-10.0-19044

Running from MSYS2 MinGW 64-bit with CMake 3.22.1 with gcc 11.2.0 on my fork https://github.com/SamuelMarks/fswatch/tree/multi-os-ci:

# Run from empty build dir:
cmake ..

Error:

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

Related:

I too am having a very similar issue (I think). Here is a bit of the build log where cmake kindly informs me where to go to post about the issue:

System is unknown to cmake, create:

[453](https://github.com/ctc-oss/omega-edit/runs/4889162055?check_suite_focus=true#step:5:453)Platform/MINGW64_NT-10.0-17763 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake

I’m new to the forums and relatively new to cmake. Things started getting complex when I vendor’ed in gRPC (which also uses cmake) as a submodule that I need to link against. Any assistance would be greatly appreciated. Thanks!

If you received the message, then you likely installed the generic “cmake” for gcc instead of the cmake specific to Msys2. For that you need to install “mingw-w64-x86_64-cmake”

Thanks David, you saved my day, after install the correct cmake version by

pacman -S mingw-w64-x86_64-cmake

It resolves the problem of ‘System is unknown to cmake’.

Hmm, that sort of worked @drankinatty
https://packages.msys2.org/search?q=cmake

call "C:\msys64""\msys2_shell.cmd" -defterm -no-start -here -mingw32 -c "cmake -DCMAKE_BUILD_TYPE='Debug' .. && cmake --build . && ctest -C 'Debug' && cpack -G 'ZIP' -C 'Debug'"
-- The C compiler identification is GNU 11.3.0
System is unknown to cmake, create:
Platform/MINGW32_NT-10.0-22621 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/MINGW32_NT-10.0-22621 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake

(the same works when -mingw64 is specified; so is it that MinGW 32-bit variant isn’t supported by CMake?)

Ended up:

pacman -S --needed base-devel mingw-w64-i686-cmake mingw-w64-i686-toolchain mingw-w64-i686-ninja

Which solved the problem (at least with -G Ninja)

This problem also exists though I had installed “mingw-w64-x86_64-cmake”

like this:$ cmake …
– The C compiler identification is GNU 13.2.0
– The CXX compiler identification is GNU 13.2.0
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-22621 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake