Or you can use Nim files as a build system: "Small" example with one-pass static compilation of all C files:
* [https://github.com/numforge/laser/blob/d1e6ae61/laser/cpuinfo.nim#L274-L353](https://github.com/numforge/laser/blob/d1e6ae61/laser/cpuinfo.nim#L274-L353) Original cmake was 800+ lines (to handle all combination of Windows, Linux, Mac, Android, iOS, x86, x86-64, ARM32, ARM64) * [https://github.com/pytorch/cpuinfo/blob/d5e37adf/CMakeLists.txt](https://github.com/pytorch/cpuinfo/blob/d5e37adf/CMakeLists.txt) Complex example in 2 passes which builds the C++ DLL via Nim: * [https://github.com/numforge/agent-smith/blob/a2d9251e/third_party/ale_build.nim#L40-L83](https://github.com/numforge/agent-smith/blob/a2d9251e/third_party/ale_build.nim#L40-L83) > and then wrap it: * [https://github.com/numforge/agent-smith/blob/a2d9251e/third_party/ale_wrap.nim#L24-L39](https://github.com/numforge/agent-smith/blob/a2d9251e/third_party/ale_wrap.nim#L24-L39) Original CMake was 250+ lines
