Portable C++23 maze experiments built with CMake.
- CMake 3.28 or newer
- A C23 and C++23 compiler
ncurses- macOS or Linux
Windows is not supported yet. On the first configure, CMake fetches and builds
c-roblib from its main branch. Later builds reuse the staged dependency in
the build directory. When the source checkout already exists, configuration
checks the remote branch and updates the dependency only when a different
revision is available; if the network is unavailable, the local revision is
used unchanged.
On macOS, if Homebrew and its keg-only ncurses formula are installed, the
build automatically prefers Homebrew's wide-character ncursesw through
pkg-config. Otherwise it falls back to CMake's portable Curses discovery.
The Homebrew path supplies _DARWIN_C_SOURCE and the required include and
linker settings without requiring project-wide compiler flags.
From the project root, configure a Debug build with:
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=DebugBuild the project with:
cmake --build cmake-build-debugFor a Release build, use a separate build directory (NOTE: no release build supported yet):
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-releaseThe executable is written to the selected build directory as
mazes_n_things.
Google Test is fetched only for Debug configurations. CMake caches the
checkout under cmake-build-debug/_deps/; it is reused across normal rebuilds
and reconfiguration. Removing cmake-build-debug also removes that checkout,
so the next configure will download it again.
Run the Debug build from the project root with:
./cmake-build-debug/mazes_n_thingsFor the Release build, use:
./cmake-build-release/mazes_n_thingsRun the configured tests with:
ctest --test-dir cmake-build-debug --output-on-failureTo remove one generated build directory, use:
rm -rf cmake-build-debugFor the Release build, use:
rm -rf cmake-build-releaseRemoving a build directory also removes its locally staged c-roblib source,
archive, and headers. The next configure will therefore require network access
to fetch the dependency again.
To skip the remote revision check, configure with
-DROBLIB_CHECK_FOR_UPDATES=OFF. ROBLIB_REPOSITORY and ROBLIB_TAG remain
available as cache variables for selecting a repository or branch, tag, or
commit; pinning a specific release is recommended once c-roblib has stable
versioning.