cmake MSYS Makefiles generator missing

拈花ヽ惹草 提交于 2019-12-05 02:06:20

Instead of installing the cmake package, I think you need to install mingw-w64-i686-cmake (or the 64-bit version mingw-w64-x86_64-cmake).

If you compile native Windows binaries on Linux with MinGW

The MinGW and MSYS generators are only available on Windows based distributions. See #ifdef in cmake.cxx:

#if defined(_WIN32) && !defined(__CYGWIN__)

If you're cross-compiling use one of the available MinGW toolchains. See e.g. "How to use MinGW to cross compile software for Windows" chapter in CMake's wiki.

If you compile Windows binaries on Windows with MinGW

On my Windows PC I only have one CMake installation (the normal MSI Windows Installer with CMake directory added to PATH environment), which works from standard CMD shells and from my MSYS shells.

So in this case there is no need to install a special MinGW version of CMake (like e.g. for CygWin).

But I've rebuild CMake from source with MinGW-w64 several times lately to test some performance optimizations of cmake.exe and it did not work out-of-the-box. To work around the linker errors I've added -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition" like recommended here and the resulting cmake.exe still supports the "MSYS Makefiles" generator.

So yes, there is - as you have commented - most probably something wrong with the pacman build.

I got the exact same message when trying to run cmake in the MSYS shell. Use a MinGW Shell (for instance MinGW-w64 Win64 Shell) instead.

I guess the pacman build is just broken, so I've resolved this issue by installing the Windows version of CMake from cmake.org with the msi installer.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!