summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2017-07-12 10:27:50 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2017-07-12 10:27:50 +0900
commit161e2de06f8f9987d6a5a0eefe7f997ce89950ef (patch)
tree76285176b217b6adf10de36c7d71d134934b4646 /Rakefile
parent583621600a9b124a30cf49f42c2fae60907b91ac (diff)
downloadpsych-161e2de06f8f9987d6a5a0eefe7f997ce89950ef.tar.gz
Added rake-compiler-dock for mingw builds
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index a72ca50..c5d78f2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -27,7 +27,15 @@ else
require 'rake/extensiontask'
Rake::ExtensionTask.new("psych") do |ext|
ext.lib_dir = File.join(*['lib', ENV['FAT_DIR']].compact)
+ ext.cross_compile = true
+ ext.cross_platform = %w[x86-mingw32 x64-mingw32]
end
end
+task 'gem:native' do
+ require 'rake_compiler_dock'
+ sh "bundle package" # Avoid repeated downloads of gems by using gem files from the host.
+ RakeCompilerDock.sh "bundle --local && rake cross native gem"
+end
+
task :default => [:compile, :test]