summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-19 10:57:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-19 10:57:51 (GMT)
commit8fad32f5b9ebf47ced97bfb40d73ffafb5d96aca (patch)
treec34a842458509d52f096eb7d9725dd9075b70a93
parent9abc99e90538d90634a14dd5349b3363f63d39c3 (diff)
parent1994f950fff32cfcc20823269e008a34bfe6acf0 (diff)
downloadCMake-8fad32f5b9ebf47ced97bfb40d73ffafb5d96aca.zip
CMake-8fad32f5b9ebf47ced97bfb40d73ffafb5d96aca.tar.gz
CMake-8fad32f5b9ebf47ced97bfb40d73ffafb5d96aca.tar.bz2
Merge topic 'trace-format-json-doc' into release-3.17
1994f950ff cmake: List valid values for --trace-format on the command line e39766d84a Help: Fix documentation of --trace-format parameter Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4500
-rw-r--r--Help/manual/cmake.1.rst2
-rw-r--r--Source/cmake.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 44b1f2f..28a081f 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -266,7 +266,7 @@ Options
Prints each trace line in a human-readable format. This is the
default format.
- ``json``
+ ``json-v1``
Prints each line as a separate JSON document. Each document is
separated by a newline ( ``\n`` ). It is guaranteed that no
newline characters will be present inside a JSON document.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index f4b9f16..a99d9a6 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -751,7 +751,8 @@ void cmake::SetArgs(const std::vector<std::string>& args)
const auto traceFormat =
StringToTraceFormat(arg.substr(strlen("--trace-format=")));
if (traceFormat == TraceFormat::TRACE_UNDEFINED) {
- cmSystemTools::Error("Invalid format specified for --trace-format");
+ cmSystemTools::Error("Invalid format specified for --trace-format. "
+ "Valid formats are human, json-v1.");
return;
}
this->SetTraceFormat(traceFormat);