diff options
-rw-r--r-- | bdep/new.cli | 30 | ||||
-rw-r--r-- | bdep/new.cxx | 7 | ||||
-rw-r--r-- | tests/common.test | 2 | ||||
-rw-r--r-- | tests/new.test | 4 |
4 files changed, 31 insertions, 12 deletions
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 { "<dir>", - "Add an existing build configuration <dir>." + "Create the project in the specified directory." } - dir_path --config-create|-C + dir_path --directory|-d { "<dir>", - "Create a new build configuration in <dir>." + "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 { "<dir>", - "Create the project in the specified directory." + "Add an existing build configuration <dir>." } - dir_path --directory|-d + dir_path --config-create|-C { "<dir>", - "Assume project is in the specified directory rather than in the current - working directory." + "Create a new build configuration in <dir>." } }; 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) diff --git a/tests/common.test b/tests/common.test index 0b1153c..d85e038 100644 --- a/tests/common.test +++ b/tests/common.test @@ -27,7 +27,7 @@ clean = $* clean deinit = $* deinit init = $* init fetch = $* fetch -new = $* new +new = $* new --no-checks status = $* status sync = $* sync update = $* update diff --git a/tests/new.test b/tests/new.test index b5b3670..703540a 100644 --- a/tests/new.test +++ b/tests/new.test @@ -4,6 +4,10 @@ .include common.test +# Disable nesting checks and amalgamation support in the created projects. +# +test.arguments += --no-checks --no-amalgamation + cxx = "config.cxx=$config.cxx" status += -d prj |