diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-09-08 18:15:19 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-09-08 18:15:19 +0800 |
commit | a132d6482e458a1b5c48b5115c0ddaefd918ecf9 (patch) | |
tree | f233d34174713681090b66155a6252b1cfa73446 /tools/minicargo/manifest.h | |
parent | 1ec80a35fa2d682f42727e6518d482eb410c4801 (diff) | |
download | mrust-a132d6482e458a1b5c48b5115c0ddaefd918ecf9.tar.gz |
minicargo - Build binaries
Diffstat (limited to 'tools/minicargo/manifest.h')
-rw-r--r-- | tools/minicargo/manifest.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/minicargo/manifest.h b/tools/minicargo/manifest.h index c12c333b..99df7843 100644 --- a/tools/minicargo/manifest.h +++ b/tools/minicargo/manifest.h @@ -238,8 +238,18 @@ class PackageManifest public: static PackageManifest load_from_toml(const ::std::string& path); + bool has_library() const; const PackageTarget& get_library() const; + bool foreach_binaries(::std::function<bool(const PackageTarget&)> cb) const { + for(const auto& t : m_targets ) { + if( t.m_type == PackageTarget::Type::Bin ) { + if( !cb(t) ) + return false; + } + } + return true; + } const ::helpers::path directory() const { return ::helpers::path(m_manifest_path).parent(); |