From f614173d688fd6e57871e1bab5a159e06a2ac07a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Jul 2018 15:38:54 +0200 Subject: Fix test breakages due to nesting checks and amalgamation --- bdep/new.cli | 30 +++++++++++++++++++++--------- bdep/new.cxx | 7 +++++-- 2 files changed, 26 insertions(+), 11 deletions(-) (limited to 'bdep') diff --git a/bdep/new.cli b/bdep/new.cli index 63c5c51..b188af9 100644 --- a/bdep/new.cli +++ b/bdep/new.cli @@ -195,16 +195,17 @@ namespace bdep new project." } - dir_path --config-add|-A + dir_path --output-dir|-o { "", - "Add an existing build configuration ." + "Create the project in the specified directory." } - dir_path --config-create|-C + dir_path --directory|-d { "", - "Create a new build configuration in ." + "Assume the project is in the specified directory rather than in the + current working directory. Only used with \cb{--package}." } cmd_new_type --type|-t @@ -232,17 +233,28 @@ namespace bdep system-specific." } - dir_path --output-dir|-o + bool --no-amalgamation + { + "Create a project with disabled amalgamation support. This option is + normally only used for testing." + } + + bool --no-checks + { + "Suppress nested project/package checks. This option is normally only + used for testing." + } + + dir_path --config-add|-A { "", - "Create the project in the specified directory." + "Add an existing build configuration ." } - dir_path --directory|-d + dir_path --config-create|-C { "", - "Assume project is in the specified directory rather than in the current - working directory." + "Create a new build configuration in ." } }; diff --git a/bdep/new.cxx b/bdep/new.cxx index 7cdddc8..76bb63b 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -170,6 +170,7 @@ namespace bdep // Do some sanity check (nested packages, etc; you would be surprised what // people come up with). // + if (!o.no_checks ()) { project_package pp ( find_project_package (out, true /* ignore_not_found */)); @@ -366,8 +367,10 @@ namespace bdep // build/bootstrap.build // os.open (f = bd / "bootstrap.build"); - os << "project = " << n << endl - << endl + os << "project = " << n << endl; + if (o.no_amalgamation ()) + os << "amalgamation = # Disabled." << endl; + os << endl << "using version" << endl << "using config" << endl; if (tests) -- cgit v1.1