rake-compile 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5ecf04771fcb41486979d9898c250eaa7fb073c
4
- data.tar.gz: b001cc30c57d6fc01c2f3e7629edcfae744666f0
3
+ metadata.gz: ec42b86f3676de968db2c3e74bcd3492e56297b2
4
+ data.tar.gz: 22d84781446771e787b5c0eba35e0da66155b710
5
5
  SHA512:
6
- metadata.gz: 5af0014c4d30f7bf9ec4475777bdfb3854ebf5e95e967c1f07d59d0703d6b1977f0a4c2577caa316a2d1741f2f3838dc3bad6f1328649e1f67cd370f2eec5317
7
- data.tar.gz: 27927ca74e709010c4f97e243ce93d4ed6de66ec9fb3b81e740733f9d6ac2ac8831fd875f9fd62e048854d0ea255a595604524a6228c7a72df8b677ec8260a77
6
+ metadata.gz: 1d751bca7ca6443f233175716c5d3eb02eecf8b74c9064495f77877857293b9b97b9a3dda5a6ad0106626b53b85f72fc2952a03d4e85208d588fe811cbe0e7a5
7
+ data.tar.gz: 1db5e99c47c25c8bea69b6ad5843ec30baaf5614d56c55d7821123f085481bbcd7cbf5bb7385169ec9434d418a70222f9ab025fb0e5875faa8a401552a98824c
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ *.gem
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in c-dependencies.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,24 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rake-compile (0.2.2)
5
+ colorize
6
+ rake (~> 10.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ colorize (0.7.7)
12
+ minitest (5.8.2)
13
+ rake (10.4.2)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ bundler (~> 1.10)
20
+ minitest
21
+ rake-compile!
22
+
23
+ BUNDLED WITH
24
+ 1.10.6
data/LICENSE ADDED
File without changes
data/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # rake-compile
2
+
3
+ rake-compile is a set of rake DSL extensions that are useful for building C and C++ projects. I like rake a lot, but I found that I needed a lot of infrastructure in place to get a full build system going. This gem just wraps up that functionality.
4
+
5
+ ## Features
6
+
7
+ - Automatic source dependency calculation
8
+ - Dependency caching for faster rake invocations
9
+ - PCH file support
10
+ - Parallel building using rake's -j option
11
+ - automatic clean and clobber
12
+
13
+ ## Functions
14
+
15
+ # These methods apply to all targets defined, useful for setting up your build environment
16
+ build_directory <path>
17
+ base_cc_flags <flags>
18
+ base_cpp_flags <flags>
19
+
20
+ # These methods apply only to the next target defined, similar to desc for tasks
21
+ cc_flags <flags>
22
+ cpp_flags <flags>
23
+ link_library <path>
24
+ pch <path>
25
+
26
+ # These two methods define a build target. They take a block that allows you to specify the
27
+ # object files that make up the final artifact
28
+ static_library <path>
29
+ executable <path>
30
+
31
+ ## Example
32
+
33
+ Here's a simple example that shows how the DSL is used.
34
+
35
+ # define your source files
36
+ SOURCES = FileList['**/*.cpp']
37
+
38
+ # define a directory that will hold build artifacts
39
+ build_directory BUILD_DIR
40
+
41
+ # define flags that will apply to all invocations of the default compiler
42
+ base_cpp_flags("-std=c++11 -I#{File.dirname(__FILE__)}")
43
+ base_cc_flags("-std=c11 -I#{File.dirname(__FILE__)}")
44
+
45
+ # define a pre-compiled header, that will be applied to the subsequently-defined target
46
+ pch 'my_prefix_header.pch'
47
+
48
+ # define compiler flags that will only apply to the subsequently-defined target
49
+ cpp_flags '-Iinclude'
50
+
51
+ # link the target with a library
52
+ link_library '/usr/local/lib/libz.a'
53
+
54
+ # define an executable target, and build it by compiling all the sources and linking
55
+ executable 'mybinary' do |target|
56
+ # you can add objects via a FileList directory
57
+ target.add_objects_from_sources SOURCES
58
+
59
+ # or, for one source file at a time
60
+ target.add_object_from_source 'my_source.cpp'
61
+
62
+ # or create a direct mapping from source to object
63
+ target.add_object 'my_obj.o', 'special_source.cpp'
64
+ end
65
+
66
+ ## Installation
67
+
68
+ Add this line to your application's Gemfile:
69
+
70
+ ```ruby
71
+ gem 'rake-compile'
72
+ ```
73
+
74
+ And then execute:
75
+
76
+ $ bundle
77
+
78
+ Or install it yourself as:
79
+
80
+ $ gem install c-dependencies
81
+
82
+ ## Contributing
83
+
84
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
85
+
86
+ ## License
87
+
88
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
89
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,3 @@
1
+ module RakeCompile
2
+ VERSION = "0.2.2"
3
+ end
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rake-compile/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'rake-compile'
8
+ spec.version = RakeCompile::VERSION
9
+ spec.authors = ['Matt Massicotte']
10
+
11
+ spec.summary = 'Rake-compile makes it easier to use rake to build C/C++ projects'
12
+ spec.description = 'Rake-compile is a set of Rake DSL extensions to help build C/C++ projects'
13
+ spec.homepage = 'https://github.com/mattmassicotte/rake-compile'
14
+ spec.license = 'MIT'
15
+
16
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
+ # delete this section to allow pushing this gem to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = 'exe'
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ['lib']
28
+
29
+ spec.add_dependency 'rake', "~> 10.0"
30
+ spec.add_runtime_dependency 'colorize'
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.10"
33
+ spec.add_development_dependency "minitest"
34
+ end
metadata CHANGED
@@ -1,41 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Massicotte
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2014-01-04 00:00:00.000000000 Z
11
+ date: 2015-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '10.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '10.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.10'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.10'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  description: Rake-compile is a set of Rake DSL extensions to help build C/C++ projects
@@ -44,6 +72,13 @@ executables: []
44
72
  extensions: []
45
73
  extra_rdoc_files: []
46
74
  files:
75
+ - ".gitignore"
76
+ - CODE_OF_CONDUCT.md
77
+ - Gemfile
78
+ - Gemfile.lock
79
+ - LICENSE
80
+ - README.md
81
+ - Rakefile
47
82
  - lib/rake-compile.rb
48
83
  - lib/rake-compile/application.rb
49
84
  - lib/rake-compile/compiler.rb
@@ -52,27 +87,30 @@ files:
52
87
  - lib/rake-compile/logging.rb
53
88
  - lib/rake-compile/multi_file_task.rb
54
89
  - lib/rake-compile/target.rb
90
+ - lib/rake-compile/version.rb
91
+ - rake-compile.gemspec
55
92
  homepage: https://github.com/mattmassicotte/rake-compile
56
93
  licenses:
57
94
  - MIT
58
- metadata: {}
95
+ metadata:
96
+ allowed_push_host: https://rubygems.org
59
97
  post_install_message:
60
98
  rdoc_options: []
61
99
  require_paths:
62
100
  - lib
63
101
  required_ruby_version: !ruby/object:Gem::Requirement
64
102
  requirements:
65
- - - '>='
103
+ - - ">="
66
104
  - !ruby/object:Gem::Version
67
105
  version: '0'
68
106
  required_rubygems_version: !ruby/object:Gem::Requirement
69
107
  requirements:
70
- - - '>='
108
+ - - ">="
71
109
  - !ruby/object:Gem::Version
72
110
  version: '0'
73
111
  requirements: []
74
112
  rubyforge_project:
75
- rubygems_version: 2.2.0
113
+ rubygems_version: 2.4.5
76
114
  signing_key:
77
115
  specification_version: 4
78
116
  summary: Rake-compile makes it easier to use rake to build C/C++ projects