summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-05 14:33:27 +0500
committerEgor Tensin <egor@tensin.name>2026-10-05 14:33:27 +0500
commit0e26a35cd2d4f097f24cfbb4edb10cfcdcfa2098 (patch)
treeb3944cd8af49bb4d414dbec4a282f804ce6d7422
parentproject.ctest_driver: verbose logging (diff)
downloadcmake-common-0e26a35cd2d4f097f24cfbb4edb10cfcdcfa2098.tar.gz
cmake-common-0e26a35cd2d4f097f24cfbb4edb10cfcdcfa2098.zip
update README & docs
-rw-r--r--README.md13
-rw-r--r--docs/ctest-driver.md7
-rw-r--r--docs/project-clang-format.md6
3 files changed, 14 insertions, 12 deletions
diff --git a/README.md b/README.md
index 7623bff..7542f7d 100644
--- a/README.md
+++ b/README.md
@@ -90,16 +90,15 @@ Build (and optionally, install) a CMake project.
Pass the `--help` flag to view detailed usage information.
-Tools
------
+Additional tools
+----------------
-* [project-clang-format.py] &mdash; `clang-format` all C/C++ files in the
-project.
-* [ctest-driver.py] &mdash; wrap an executable for testing with CTest;
+* [project-format] &mdash; `clang-format` all C/C++ files in the project.
+* [project-ctest-driver] &mdash; wrap an executable for testing with CTest;
cross-platform `grep`.
-[project-clang-format.py]: docs/project-clang-format.md
-[ctest-driver.py]: docs/ctest-driver.md
+[project-format]: docs/project-clang-format.md
+[project-ctest-driver]: docs/ctest-driver.md
Examples
--------
diff --git a/docs/ctest-driver.md b/docs/ctest-driver.md
index e196a36..3f3f2a5 100644
--- a/docs/ctest-driver.md
+++ b/docs/ctest-driver.md
@@ -4,10 +4,11 @@ PASS_REGULAR_EXPRESSION feature:
1. The regular expression syntax used by CMake is deficient.
2. The exit code of a test is ignored if one of the regexes matches.
-`ctest-driver.py` tries to fix them.
+`project-ctest-driver` (alternatively, `python -m project.ctest_driver`) tries
+to fix them.
- $ python path/to/tools/ctest-driver.py run --pass-regex OK --fail-regex Fail -- path/to/executable arg1 arg2
+ $ project-ctest-driver run --pass-regex OK --fail-regex Fail -- path/to/executable arg1 arg2
In addition, it's a cross-platform `grep`:
- $ python path/to/tools/ctest-driver.py grep --pass-regex OK --fail-regex Fail -- path/to/logfile.log
+ $ project-ctest-driver grep --pass-regex OK --fail-regex Fail -- path/to/logfile.log
diff --git a/docs/project-clang-format.md b/docs/project-clang-format.md
index 1beeced..821ad9f 100644
--- a/docs/project-clang-format.md
+++ b/docs/project-clang-format.md
@@ -1,5 +1,7 @@
`clang-format` all C/C++ files in the project.
$ cd project/
- $ python path/to/tools/project-clang-format.py # Prints a diff
- $ python path/to/tools/project-clang-format.py -i # Edits files in-place
+ $ project-format # Prints a diff
+ $ project-format -i # Edits files in-place
+
+Alternatively, run it as a Python module: `python -m project.format`