@Override
	protected void initRuntime(RunOptions runOptions) throws Exception {
		String runtimePath = getRuntimePath();

		if (isWindows()) {
			String[] command = {
				getCompilerPath(), "antlr4cpp-vs2022.vcxproj", "/p:configuration=Release DLL", "/p:platform=x64"
			};

			runCommand(command, runtimePath + "\\runtime","build c++ ANTLR runtime using MSBuild");
		}
		else {
			// cmake ignores default of OFF and must explicitly say yes or no on tracing arg. grrr...
			String trace = "-DTRACE_ATN="+(runOptions.traceATN?"ON":"OFF");
			String[] command = {"cmake", ".", trace, "-DCMAKE_BUILD_TYPE=Release"};
			runCommand(command, runtimePath, "run cmake on antlr c++ runtime");

			command = new String[] {"make", "-j", Integer.toString(Runtime.getRuntime().availableProcessors())};
			runCommand(command, runtimePath, "run make on antlr c++ runtime");
		}
	}
For my own information on I'm recording what I needed to do to get a unit test to compile and run in C++ on the Mac.
I got a segmentation violation and couldn't figure out how to get information about it, so I turned on debugging
and then figured out lldb enough to create this issue: https://github.com/antlr/antlr4/issues/3845 on a bug.

cd ~/antlr/code/antlr4/runtime/Cpp
cmake . -D CMAKE_OSX_ARCHITECTURES="arm64; x86_64" -DCMAKE_BUILD_TYPE=Debug
make -j 8

In test dir with generated test code:

clang++ -g -std=c++17 -I /Users/parrt/antlr/code/antlr4/runtime/Cpp/runtime/src -L. -lantlr4-runtime *.cpp
./a.out input

$ lldb ./a.out input
(lldb) run
... crash ...
(lldb) thread backtrace
runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/CppRunner.java