Skip to content

Commit 17894e0

Browse files
author
Edward Thomson
committed
cmake: honor CMAKE_FLAGS environment variable
Expose `CMAKE_FLAGS` so that users can supply configuration flags to cmake (eg `-DUSE_SHA1DC=ON`)
1 parent 73ff35a commit 17894e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/rugged/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def sys(cmd)
7777
Dir.chdir("build") do
7878
# On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles.
7979
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 #{generator}")
80+
sys("cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{ENV['CMAKE_FLAGS']} #{generator}")
8181
sys(MAKE)
8282

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

0 commit comments

Comments
 (0)