pw_presubmit: Run CMake tests in default presubmit

Add the CMake tests to the 'quick' presubmit program so they run locally
by default (on supported platforms).

Bug: 251
Change-Id: I16a1fa44d167456a7234de4b58d71aed012de9e3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/24261
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/cli.py b/pw_presubmit/py/pw_presubmit/cli.py
index b43fc69..7b0fdd5 100644
--- a/pw_presubmit/py/pw_presubmit/cli.py
+++ b/pw_presubmit/py/pw_presubmit/cli.py
@@ -131,7 +131,7 @@
 
 def run(
         program: Sequence[Callable],
-        output_directory: Path,
+        output_directory: Optional[Path],
         package_root: Path,
         clear: bool,
         root: Path = None,
@@ -160,7 +160,7 @@
     if not repositories:
         repositories = [root]
 
-    if not output_directory:
+    if output_directory is None:
         output_directory = root / '.presubmit'
 
     if not package_root:
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index fdbd072..794967d 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -471,6 +471,7 @@
     # failing.
     oss_fuzz_build,
     bazel_test,
+    cmake_tests,
     gn_nanopb_build,
 )
 
@@ -478,11 +479,15 @@
     commit_message_format,
     init_cipd,
     init_virtualenv,
+    source_is_in_build_files,
     copyright_notice,
     format_code.presubmit_checks(),
     pw_presubmit.pragma_once,
     gn_quick_build_check,
-    source_is_in_build_files,
+    # TODO(pwbug/141): Re-enable CMake and Bazel for Mac after we have fixed the
+    # the clang issues. The problem is that all clang++ invocations need the
+    # two extra flags: "-nostdc++" and "${clang_prefix}/../lib/libc++.a".
+    cmake_tests if sys.platform != 'darwin' else (),
 )
 
 FULL = (
@@ -499,10 +504,6 @@
     # On Mac OS, system 'gcc' is a symlink to 'clang' by default, so skip GCC
     # host builds on Mac for now.
     gn_gcc_build if sys.platform != 'darwin' else (),
-    # TODO(pwbug/141): Re-enable CMake and Bazel for Mac after we have fixed the
-    # the clang issues. The problem is that all clang++ invocations need the
-    # two extra flags: "-nostdc++" and "${clang_prefix}../lib/libc++.a".
-    cmake_tests if sys.platform != 'darwin' else (),
     source_is_in_build_files,
     python_checks,
     build_env_setup,