diff options
author | Wouter Klouwen <wouter.klouwen@youview.com> | 2019-02-02 09:06:36 +0000 |
---|---|---|
committer | Wouter Klouwen <wouter.klouwen@youview.com> | 2020-03-07 13:36:27 +0000 |
commit | 9aa4640792bd99b232abfe826b0cb0ae72f6644a (patch) | |
tree | 6d576cb085d48a0073ddc09036a7e1a2b95df2d6 /Source/cmakemain.cxx | |
parent | 8f122b45570e8357886df115d78007c4ea437daa (diff) | |
download | cmake-9aa4640792bd99b232abfe826b0cb0ae72f6644a.tar.gz |
cmake: add command line options to output script profiling data
For users of CMake who want to optimize their scripts if they take a
while to run, this commit adds the ability to output profiling data.
To enable this output, it adds the two command line parameters
to select the output path and format.
This commit adds the first profiling format of type ``google-trace``,
which is the output is a JSON file containing Duration events as per the
Google Trace Format specification:
https://docs.google.com/document/d/1CvAClvFfyA5R-
PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 494d5d982d..90d8ea6c3e 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -93,6 +93,12 @@ const char* cmDocumentationOptions[][2] = { { "--check-system-vars", "Find problems with variable usage in system " "files." }, +# if !defined(CMAKE_BOOTSTRAP) + { "--profiling-format=<fmt>", "Output data for profiling CMake scripts." }, + { "--profiling-output=<file>", + "Select an output path for the profiling data enabled through " + "--profiling-format." }, +# endif { nullptr, nullptr } }; |