-
Notifications
You must be signed in to change notification settings - Fork 0
/
teapot.rb
76 lines (50 loc) · 1.82 KB
/
teapot.rb
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# This file is part of the "Teapot" project, and is released under the MIT license.
#
teapot_version "1.3"
# Project Metadata
define_project "concurrent" do |project|
project.title = "Concurrent"
project.summary = 'Primitives for concurrent execution.'
project.license = "MIT License"
project.add_author 'Samuel Williams', email: '[email protected]'
project.version = "1.0.0"
end
# Build Targets
define_target 'concurrent-library' do |target|
target.depends "Language/C++14"
target.depends "Library/Coroutine", public: true
target.provides "Library/Concurrent" do
source_root = target.package.path + 'source'
library_path = build static_library: "Concurrent", source_files: source_root.glob('Concurrent/**/*.{cpp,c}')
append linkflags library_path
append header_search_paths source_root
end
end
define_target "concurrent-tests" do |target|
target.depends "Library/UnitTest"
target.depends "Language/C++14"
target.depends "Library/Concurrent"
target.provides "Test/Concurrent" do |*arguments|
test_root = target.package.path
run source_files: test_root.glob('test/Concurrent/**/*.cpp'), arguments: arguments
end
end
# Configurations
define_configuration "development" do |configuration|
configuration[:source] = "https://github.com/kurocha/"
configuration.import "concurrent"
# Provides all the build related infrastructure:
configuration.require "platforms"
configuration.require "build-files"
# Provides unit testing infrastructure and generators:
configuration.require "unit-test"
# Provides some useful C++ generators:
configuration.require 'generate-cpp-class'
configuration.require 'generate-project'
configuration.require 'generate-travis'
end
define_configuration "concurrent" do |configuration|
configuration.public!
configuration.require "coroutine"
end