# CMake Error: Error: generator : Ninja

**URL:** <https://sel4.discourse.group/t/cmake-error-error-generator-ninja/605>\
**Category:** Uncategorized\
**Created:** [October 15, 2022, 1:38pm UTC](https://sel4.discourse.group/t/cmake-error-error-generator-ninja/605 "2022-10-15T13:38:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sel4usr](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@sel4usr](https://sel4.discourse.group/u/sel4usr)\
**Post date:** [October 15, 2022, 1:38pm UTC](https://sel4.discourse.group/t/cmake-error-error-generator-ninja/605/1 "2022-10-15T13:38:26Z")

</div>

After searching this forum, and on the internet, I do not find similar issue. So here is my question. I follow the docs at [1] and [2], attempting to build sel4 with commands

1. git clone {sel4 github repo}
2. mkdir build
3. cd build
4. cmake -DCROSS\_COMPILER\_PREFIX=x86\_64 -DCMAKE\_TOOLCHAIN\_FILE=…/gcc.cmake -G Ninja -C …/configs/X64\_verified.cmake …

But the error is thrown

```
CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory

```

Removing MakeCache.txt file and CMakeFiles directory doesn’t help either. The result remains.

I use Debian bookworm/sid, gcc 10.3.0, cmake 3.24.2, ninja-build 1.11.1-1, generate-ninja 0.0~git20220811.0bcd37b-1.

How should I build seL4? Thanks

[1]. [Stand-alone seL4 builds | seL4 docs](https://docs.sel4.systems/projects/buildsystem/standalone.html)

[2]. [Configuring and building an seL4 project | seL4 docs](https://docs.sel4.systems/projects/buildsystem/using.html)
