MINGW-packages/mingw-w64-cmake-bootstrap/0005-Default-to-ninja-generator.patch
Christoph Reiter 0e04830886 Add cmake-bootstrap
A cmake variant that doesn't depend on any external dependencies and
can be used for bootstrapping an env, and building a full cmake.

The problem with cmake is that it depends on various libraries such
as curl, libarchive, libuv etc for which we want to use cmake instead
of autotools (native, faster, better supported on Windows).

These cycles prevent automated builds in case one of the dependencies
has an ABI break, or when bootstrapping a new environment.

Other distros avoid this by partly vendoring some dependencies, using
autotools for certain dependencies to avoid cycles, and not including the
cmake GUI tools. We'd prefer to use cmake over autotools everywhere if
supported though, and provide a full cmake installation to users.
2024-09-20 16:05:20 +02:00

15 lines
660 B
Diff

--- cmake-3.21.0/Source/cmake.cxx.orig 2021-07-19 20:15:00.027000000 +0200
+++ cmake-3.21.0/Source/cmake.cxx 2021-07-19 20:16:17.719000700 +0200
@@ -2179,7 +2179,10 @@
return gen;
}
}
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
+#if defined(_WIN32) && defined(__MINGW32__) && !defined(CMAKE_BOOT_MINGW)
+ return std::unique_ptr<cmGlobalGenerator>(
+ cm::make_unique<cmGlobalNinjaGenerator>(this));
+#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
std::string found;
// Try to find the newest VS installed on the computer and
// use that as a default if -G is not specified