summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/minicargo/manifest.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/minicargo/manifest.cpp b/tools/minicargo/manifest.cpp
index b1e947e8..adae89ec 100644
--- a/tools/minicargo/manifest.cpp
+++ b/tools/minicargo/manifest.cpp
@@ -519,15 +519,19 @@ const PackageTarget& PackageManifest::get_library() const
void PackageManifest::set_features(const ::std::vector<::std::string>& features, bool enable_default)
{
- TRACE_FUNCTION_F(m_name << " [" << features << "]");
+ TRACE_FUNCTION_F(m_name << " [" << features << "] " << enable_default);
size_t start = m_active_features.size();
- // 1. Install features
- if(enable_default && start == 0)
+ // 1. Install default features.
+ if(enable_default)
{
DEBUG("Including default features [" << m_default_features << "]");
for(const auto& feat : m_default_features)
{
+ auto it = ::std::find(m_active_features.begin(), m_active_features.end(), feat);
+ if(it != m_active_features.end()) {
+ continue ;
+ }
m_active_features.push_back(feat);
}
}