Skip to content

Commit 845cb41

Browse files
Sven PüschelSven Püschel
authored andcommitted
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.
1 parent 0772a8e commit 845cb41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/rugged/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def self.run_cmake(timeout, args)
109109

110110
Dir.chdir("build") do
111111
# On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles.
112-
generator = "-G \"MSYS Makefiles\"" if Gem.win_platform?
113-
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}")
112+
generator = Gem.win_platform? ? "MSYS Makefiles" : "Unix Makefiles"
113+
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}"])
114114
sys(MAKE)
115115

116116
# "normal" libraries (and libgit2 builds) get all these when they build but we're doing it

0 commit comments

Comments
 (0)