From 845cb41a749a6120e2a54b1b851e8da646aaeb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20P=C3=BCschel?= Date: Fri, 1 May 2026 14:02:32 +0200 Subject: [PATCH] ext: explicitly select the makefile generator Explicitly select the Unix Makefile generator for CMake when compiling the libgit dependency. This avoids the CMAKE_GENERATOR environment variable to select a different generator (e.g. Ninja) and failing the build due to a missing Makefile. --- ext/rugged/extconf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb index 738098201..f6ecea9f3 100644 --- a/ext/rugged/extconf.rb +++ b/ext/rugged/extconf.rb @@ -109,8 +109,8 @@ def self.run_cmake(timeout, args) Dir.chdir("build") do # On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles. - generator = "-G \"MSYS Makefiles\"" if Gem.win_platform? - run_cmake(5 * 60, ".. -DBUILD_TESTS=OFF -DUSE_THREADS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{cmake_flags.join(' ')} #{generator}") + generator = Gem.win_platform? ? "MSYS Makefiles" : "Unix Makefiles" + run_cmake(5 * 60, %[.. -DBUILD_TESTS=OFF -DUSE_THREADS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{cmake_flags.join(' ')} -G "#{generator}"]) sys(MAKE) # "normal" libraries (and libgit2 builds) get all these when they build but we're doing it