From cb286fd20b9b194947b6b583bf18f8d7e57ae995 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 7 May 2013 21:42:39 +0300 Subject: [PATCH] Properly process the command line arguments --- source/buildercli.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/buildercli.cpp b/source/buildercli.cpp index 35eba9c..c470f04 100644 --- a/source/buildercli.cpp +++ b/source/buildercli.cpp @@ -121,14 +121,16 @@ BuilderCLI::BuilderCLI(int argc, char **argv): else if(!clean && !create_makefile) build = true; - const vector &args = getopt.get_args(); - for(vector::const_iterator i=args.begin(); i!=args.end(); ++i) + for(NameList::iterator i=cmdline_targets.begin(); i!=cmdline_targets.end(); ) { string::size_type equal = i->find('='); if(equal!=string::npos) + { cmdline_options.insert(Config::InputOptions::value_type(i->substr(0, equal), i->substr(equal+1))); + cmdline_targets.erase(i++); + } else - cmdline_targets.push_back(*i); + ++i; } if(!work_dir.empty()) -- 2.45.2