-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
38 lines (32 loc) · 818 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
require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb']
end
require 'rake/extensiontask'
task build: :compile
Rake::ExtensionTask.new('odgi') do |ext|
ext.lib_dir = 'lib/odgi'
end
namespace :jemalloc do
desc 'Building jemalloc'
task :build do
Dir.chdir('jemalloc') do
sh './autogen.sh'
sh './configure --disable-initial-exec-tls'
sh "make -j #{Etc.nprocessors}"
end
end
end
namespace :odgi do
desc 'Building odgi'
task :build do
jemalloc_lib_dir = File.expand_path('jemalloc/lib', __dir__)
Dir.chdir('odgi') do
sh "cmake -H. -Bbuild -DJEMALLOC_LIBRARY=#{jemalloc_lib_dir}"
sh "cmake --build build -- -j #{Etc.nprocessors}"
end
end
end