From 75af85e5a0ab9e9df604e09cf7444968028401cb Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 6 May 2020 03:51:27 -0400 Subject: [PATCH] disabled prebuilts for now fixed unknown options being interpreted as task names --- src/conf.cpp | 2 +- src/conf.h | 2 +- src/main.cpp | 5 +++-- src/tasks/boost.cpp | 12 ++++++------ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/conf.cpp b/src/conf.cpp index f8cd1da..afd9cbe 100644 --- a/src/conf.cpp +++ b/src/conf.cpp @@ -44,7 +44,7 @@ static path_map g_tools = static bool_map g_prebuilt = { - {"boost", false} + //{"boost", false} }; static string_map g_versions = diff --git a/src/conf.h b/src/conf.h index 436646f..f9055e6 100644 --- a/src/conf.h +++ b/src/conf.h @@ -59,7 +59,7 @@ struct prebuilt { static bool by_name(const std::string& s); - VALUE(boost); + //VALUE(boost); }; struct versions diff --git a/src/main.cpp b/src/main.cpp index 18df8c6..c6341a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,7 +43,7 @@ std::optional handle_command_line(int argc, char** argv) clipp::group g; g.push_back( - (clipp::option("--version") >> cmd.version) + (clipp::option("-v", "--version") >> cmd.version) % "shows the version", (clipp::option("-h", "--help") >> cmd.help) @@ -85,7 +85,8 @@ std::optional handle_command_line(int argc, char** argv) % "sets an option, such as 'versions/openssl=1.2'; -s with no " "arguments lists the available options", - (clipp::opt_values("task", g_tasks_to_run)) + (clipp::opt_values( + clipp::match::prefix_not("-"), "task", g_tasks_to_run)) % "tasks to run" ); diff --git a/src/tasks/boost.cpp b/src/tasks/boost.cpp index c236dae..b0d0f97 100644 --- a/src/tasks/boost.cpp +++ b/src/tasks/boost.cpp @@ -16,17 +16,17 @@ fs::path boost::source_path() void boost::do_fetch() { - if (prebuilt::boost()) - fetch_prebuilt(); - else + //if (prebuilt::boost()) + // fetch_prebuilt(); + //else fetch_from_source(); } void boost::do_build_and_install() { - if (prebuilt::boost()) - build_and_install_prebuilt(); - else + //if (prebuilt::boost()) + // build_and_install_prebuilt(); + //else build_and_install_from_source(); }