-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
59 lines (49 loc) · 873 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require 'fileutils'
directory 'gen'
task :default => :build
desc 'Build'
task :build => 'gen' do
Dir.chdir 'vendor' do
sh 'rake'
end
Dir.chdir('gen') do
sh 'cmake ..'
sh 'make'
end
end
desc 'Run the test.'
task :test => 'gen' do
Dir.chdir 'vendor' do
sh 'rake devtool'
end
Dir.chdir('gen') do
sh 'cmake -D IS_TEST=true ..'
sh 'make'
Dir.chdir('test') do
FileUtils.rm_rf 'tmp'
FileUtils.mkdir_p 'tmp'
sh './spec_bin --reporter=spec'
end
end
end
desc 'Clean'
task :clean => 'gen' do
Dir.chdir('gen') do
sh 'make clean'
end
end
desc 'Rebuild'
task :rebuild => 'gen' do
Dir.chdir('gen') do
sh 'make clean all'
end
end
desc 'Distclean'
task :distclean do
FileUtils.rm_rf 'gen'
if ENV['r'] == 'true' then
Dir.chdir 'vendor' do
sh 'rake distclean'
end
end
end