cmake: honor CMAKE_FLAGS environment variable
Expose `CMAKE_FLAGS` so that users can supply configuration flags to
cmake (eg `-DUSE_SHA1DC=ON`)
@@ -77,7 +77,7 @@ else
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?
- sys("cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{generator}")
+ sys("cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{ENV['CMAKE_FLAGS']} #{generator}")
sys(MAKE)
# "normal" libraries (and libgit2 builds) get all these when they build but we're doing it
