Skip to content

Commit d35dd38

Browse files
author
Edward Thomson
committed
cmake: honor --with-sha1dc
1 parent 17894e0 commit d35dd38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/rugged/extconf.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
$CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
1313
$CFLAGS << " -Wall -Wno-comment"
1414

15+
cmake_flags = [ ENV["CMAKE_FLAGS"] ]
16+
cmake_flags << "-DUSE_SHA1DC=ON" if with_config("sha1dc")
17+
1518
def sys(cmd)
1619
puts " -- #{cmd}"
1720
unless ret = xsystem(cmd)
@@ -77,7 +80,7 @@ def sys(cmd)
7780
Dir.chdir("build") do
7881
# On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles.
7982
generator = "-G \"MSYS Makefiles\"" if Gem.win_platform?
80-
sys("cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{ENV['CMAKE_FLAGS']} #{generator}")
83+
sys("cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{cmake_flags.join(' ')} #{generator}")
8184
sys(MAKE)
8285

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

0 commit comments

Comments
 (0)