]> git.tdb.fi Git - builder.git/blobdiff - source/conditionalloader.cpp
Add gcc's private library directory to ClangLinker's system path
[builder.git] / source / conditionalloader.cpp
index 43e613b737d263b1e84469ccc7a0af8ed072d105..b9d9d25cbbd39bd1dbd6ac039c4228fdb8460c2e 100644 (file)
@@ -1,4 +1,3 @@
-#include <msp/strings/format.h>
 #include "booleanevaluator.h"
 #include "builder.h"
 #include "conditionalloader.h"
@@ -16,9 +15,10 @@ ArchitectureConditional::ArchitectureConditional(const Builder &b, const string
 
 void ArchitectureConditional::if_arch(const string &cond)
 {
-       BooleanEvaluator eval(sigc::hide<1>(sigc::mem_fun(&builder.get_current_arch(), &Architecture::match_name)), false);
+       const Architecture &arch = builder.get_current_arch();
+       BooleanEvaluator eval([&arch](const string &value){ return arch.match_name(value); });
        bool match = eval.evaluate(cond);
-       builder.get_logger().log("configure", format("%s: arch %s %smatched", log_prefix, cond, (match ? "" : "not ")));
+       builder.get_logger().log("configure", "%s: arch %s %smatched", log_prefix, cond, (match ? "" : "not "));
        if(match)
                load_sub_with(*this);
 }
@@ -33,9 +33,9 @@ FeatureConditional::FeatureConditional(const SourcePackage &p, const string &l):
 
 void FeatureConditional::if_feature(const string &cond)
 {
-       BooleanEvaluator eval(sigc::mem_fun(&package, &SourcePackage::match_feature));
+       BooleanEvaluator eval([this](const string &feat, const string *value){ return package.match_feature(feat, value); });
        bool match = eval.evaluate(cond);
-       package.get_builder().get_logger().log("configure", format("%s: feature %s %smatched", log_prefix, cond, (match ? "" : "not ")));
+       package.get_builder().get_logger().log("configure", "%s: feature %s %smatched", log_prefix, cond, (match ? "" : "not "));
        if(match)
                load_sub_with(*this);
 }