mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 06:15:24 +00:00
34 lines
757 B
Ruby
34 lines
757 B
Ruby
|
#!/usr/bin/env ruby
|
||
|
|
||
|
namespace :tests do
|
||
|
desc "Build and run the unit tests"
|
||
|
task :unit => [ 'tests/unit/all' ] do
|
||
|
run './tests/unit/all'
|
||
|
end
|
||
|
end
|
||
|
|
||
|
$build_system_modules[:gtest] = {
|
||
|
:setup => lambda do
|
||
|
$flags[:cxxflags] += " -Ilib/gtest -Ilib/gtest/include"
|
||
|
$flags[:ldflags] += " -Llib/gtest/src"
|
||
|
end,
|
||
|
|
||
|
:define_tasks => lambda do
|
||
|
#
|
||
|
# Google Test framework
|
||
|
#
|
||
|
Library.
|
||
|
new('lib/gtest/src/libgtest').
|
||
|
sources([ 'lib/gtest/src' ], :type => :dir).
|
||
|
create
|
||
|
|
||
|
Application.
|
||
|
new('tests/unit/all').
|
||
|
description("Build the unit tests executable").
|
||
|
aliases('unit_tests').
|
||
|
sources([ 'tests/unit' ], :type => :dir).
|
||
|
libraries($common_libs, :gtest, :pthread).
|
||
|
create
|
||
|
end,
|
||
|
}
|