forked from arrayfire/arrayfire-rb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
39 lines (32 loc) · 733 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require "bundler/gem_tasks"
require 'rake'
require 'rake/extensiontask'
require "rake/testtask"
require "rdoc/task"
Rake::ExtensionTask.new do |ext|
ext.name = 'arrayfire'
ext.ext_dir = 'ext/mri'
ext.lib_dir = 'lib/'
ext.source_pattern = '**/*.{c,cpp, h}'
end
task :console do
cmd = ['irb', "-r './lib/arrayfire.rb'"]
run(*cmd)
end
task :pry do
cmd = ['pry', "-r './lib/arrayfire.rb'"]
run(*cmd)
end
def run(*cmd)
sh(cmd.join(' '))
end
RDoc::Task.new do |rdoc|
rdoc.main = "README.md"
rdoc.rdoc_files.include(%w{README.md LICENSE CONTRIBUTING.md lib ext})
end
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList['test/**/*_test.rb']
end
task :default => :test