| 
					
				 | 
			
			
				@@ -9,6 +9,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <climits> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <cstdio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <cstring> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <functional> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <iostream> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <sstream> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <string> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -262,37 +263,17 @@ int do_cmake(int ac, char const* const* av) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--system-information", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       sysinfo = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(sysinfo) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-N", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       view_only = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(view_only) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-LAH", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_all_cached = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_help = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(list_all_cached, list_help) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-LA", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_all_cached = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(list_all_cached) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-LH", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_cached = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_help = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(list_cached, list_help) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-L", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       list_cached = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(list_cached) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-P", "No script specified for argument -P", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      CommandArgument::RequiresSeparator::No, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -510,15 +491,9 @@ int do_build(int ac, char const* const* av) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   std::vector<CommandArgument> arguments = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--preset", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       presetName = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToValue(presetName) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--list-presets", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       listPresets = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(listPresets) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-j", CommandArgument::Values::ZeroOrOne, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      CommandArgument::RequiresSeparator::No, jLambda }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--parallel", CommandArgument::Values::ZeroOrOne, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -527,15 +502,9 @@ int do_build(int ac, char const* const* av) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--target", CommandArgument::Values::OneOrMore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      targetLambda }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--config", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       config = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToValue(config) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--clean-first", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       cleanFirst = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(cleanFirst) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--resolve-package-references", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      CommandArgument::Values::One, resolvePackagesLambda }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-v", CommandArgument::Values::Zero, verboseLambda }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -545,10 +514,7 @@ int do_build(int ac, char const* const* av) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--use-stderr", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      [](std::string const&) -> bool { return true; } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       nativeOptionsPassed = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(nativeOptionsPassed) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (ac >= 3) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -831,31 +797,16 @@ int do_install(int ac, char const* const* av) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   std::vector<CommandArgument> arguments = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--config", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       config = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToValue(config) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--component", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       component = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    CommandArgument{ "--default-directory-permissions", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       defaultDirectoryPermissions = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToValue(component) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    CommandArgument{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      "--default-directory-permissions", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      CommandArgument::setToValue(defaultDirectoryPermissions) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--prefix", CommandArgument::Values::One, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const& value) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       prefix = value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToValue(prefix) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--strip", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     [&](std::string const&) -> bool { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       strip = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     CommandArgument::setToTrue(strip) }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "-v", CommandArgument::Values::Zero, verboseLambda }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CommandArgument{ "--verbose", CommandArgument::Values::Zero, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      verboseLambda } 
			 |