瀏覽代碼

Merge topic 'trace-format-json-doc'

1994f950ff cmake: List valid values for --trace-format on the command line
e39766d84a Help: Fix documentation of --trace-format parameter

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4500
Brad King 5 年之前
父節點
當前提交
0586123ede
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      Help/manual/cmake.1.rst
  2. 2 1
      Source/cmake.cxx

+ 1 - 1
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.

+ 2 - 1
Source/cmake.cxx

@@ -759,7 +759,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);