Add CMake support - #12
Conversation
There was a problem hiding this comment.
Some issues in your PR description
cmake --build --preset host-release --parallel
Shouldn't the preset be a "buildPresets"? host-release is a "configurePresets"
cmake --build --preset nds-release --parallel
nds-release doesn't exist in "buildPresets"? Looks like a carry over from persona-3-dual repo?
There was a problem hiding this comment.
Pull request overview
Adds initial CMake-based build/test infrastructure for aegis-engine, including vendored GoogleTest integration and CMake Presets to standardize local/CI workflows.
Changes:
- Introduces a root
CMakeLists.txtthat exportsaegis_engineas an INTERFACE library with public headers and include paths. - Adds a
tests/CMake project that builds/runs GoogleTest-based unit tests. - Adds
CMakePresets.jsonplus a GoogleTest submodule entry and ignoresout/build artifacts.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Defines the core INTERFACE library target and conditionally enables tests via CTest. |
CMakePresets.json |
Provides configure/build/test presets for host debug/release workflows. |
tests/CMakeLists.txt |
Vendors and wires GoogleTest, and defines the test executable + discovery. |
tests/entity_test.cpp |
Adds an initial GoogleTest unit test. |
.gitmodules |
Adds GoogleTest as a submodule dependency. |
.gitignore |
Ignores the out/ build output directory. |
Suppressed comments (4)
CMakePresets.json:23
- The PR description calls out Makefiles as less portable, but this preset forces the
Unix Makefilesgenerator (requiresmake, and won’t work on many Windows setups). Consider switching to a more portable generator (e.g. Ninja) or omittinggeneratorto use the platform default.
"displayName": "Aegis Engine Host Release",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/out/build/host-release",
CMakePresets.json:27
- This preset sets
AEGIS_BUILD_TESTS, but the project option isAEGIS_ENGINE_BUILD_TESTS(see CMakeLists.txt). As a result, this preset won’t actually control whether tests are added/built.
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"AEGIS_BUILD_TESTS": "ON"
}
CMakePresets.json:37
- This preset sets
AEGIS_BUILD_TESTS, but the project option isAEGIS_ENGINE_BUILD_TESTS(see CMakeLists.txt). As a result, the "no-tests" preset will still configure tests unlessBUILD_TESTINGis also disabled.
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"AEGIS_BUILD_TESTS": "OFF"
}
CMakePresets.json:33
- The PR description calls out Makefiles as less portable, but this preset forces the
Unix Makefilesgenerator (requiresmake, and won’t work on many Windows setups). Consider switching to a more portable generator (e.g. Ninja) or omittinggeneratorto use the platform default.
"displayName": "Aegis Engine Host (Library Only)",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/out/build/host-no-tests",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "CMAKE_BUILD_TYPE": "Debug", | ||
| "AEGIS_BUILD_TESTS": "ON" | ||
| } |
There was a problem hiding this comment.
Seems like a relevant concern!
| "displayName": "Aegis Engine Host Debug", | ||
| "generator": "Unix Makefiles", | ||
| "binaryDir": "${sourceDir}/out/build/host-debug", |
TheBossT910
left a comment
There was a problem hiding this comment.
Overall, the rename looks good. Copilot caught some issues, and I've also added my comment to Copilot's comments. Take a look at them.
| "CMAKE_BUILD_TYPE": "Debug", | ||
| "AEGIS_BUILD_TESTS": "ON" | ||
| } |
There was a problem hiding this comment.
Seems like a relevant concern!

Solves issue
p3d-project/persona-3-dual#344
Summary
Building the project
For release build default preset can be used instead:
The root build configuration remains lightweight, with
CMakeLists.txtacting as the main orchestrator andCMakePresets.jsonproviding configurations for different build targets.Tests
AI Disclaimer
Wasn't used.
Discord
@olesgedzTesting
CI/CD.