Created
January 31, 2016 03:00
-
-
Save duckinator/7baf37be55864a0a767d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 8b5b79c86f0ee5da2953237bf9bc6826c92b4fa1 Mon Sep 17 00:00:00 2001 | |
From: Marie Markwell <[email protected]> | |
Date: Sat, 30 Jan 2016 21:52:18 -0500 | |
Subject: [PATCH] Use MSYS Makefiles. | |
--- | |
lib/rubygems/ext/cmake_builder.rb | 2 +- | |
test/rubygems/test_gem_ext_cmake_builder.rb | 5 ++--- | |
2 files changed, 3 insertions(+), 4 deletions(-) | |
diff --git a/lib/rubygems/ext/cmake_builder.rb b/lib/rubygems/ext/cmake_builder.rb | |
index 24531bc..19e6c2e 100644 | |
--- a/lib/rubygems/ext/cmake_builder.rb | |
+++ b/lib/rubygems/ext/cmake_builder.rb | |
@@ -3,7 +3,7 @@ require 'rubygems/command' | |
class Gem::Ext::CmakeBuilder < Gem::Ext::Builder | |
def self.build(extension, directory, dest_path, results, args=[], lib_dir=nil) | |
unless File.exist?('Makefile') then | |
- cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}" | |
+ cmd = "cmake . -G \"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=#{dest_path}" | |
cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty? | |
run cmd, results | |
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb | |
index a36be47..bd2ace5 100644 | |
--- a/test/rubygems/test_gem_ext_cmake_builder.rb | |
+++ b/test/rubygems/test_gem_ext_cmake_builder.rb | |
@@ -36,7 +36,7 @@ install (FILES test.txt DESTINATION bin) | |
output = output.join "\n" | |
assert_match \ | |
- %r%^cmake \. -DCMAKE_INSTALL_PREFIX=#{Regexp.escape @dest_path}%, output | |
+ %r%^cmake \. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=#{Regexp.escape @dest_path}%, output | |
assert_match %r%#{Regexp.escape @ext}%, output | |
assert_contains_make_command '', output | |
assert_contains_make_command 'install', output | |
@@ -55,7 +55,7 @@ install (FILES test.txt DESTINATION bin) | |
output = output.join "\n" | |
shell_error_msg = %r{(CMake Error: .*)} | |
- sh_prefix_cmake = "cmake . -DCMAKE_INSTALL_PREFIX=" | |
+ sh_prefix_cmake = "cmake . -G \"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=" | |
assert_match 'cmake failed', error.message | |
@@ -81,4 +81,3 @@ install (FILES test.txt DESTINATION bin) | |
end | |
end | |
- | |
-- | |
2.7.0.windows.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment