# Ninja Multi-Config generator works not really intuitive

**URL:** https://discourse.cmake.org/t/ninja-multi-config-generator-works-not-really-intuitive/4446
**Category:** Usage
**Tags:** gen:ninja
**Created:** [November 7, 2021, 6:28pm UTC](https://discourse.cmake.org/t/ninja-multi-config-generator-works-not-really-intuitive/4446 "2021-11-07T18:28:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [November 7, 2021, 6:28pm UTC](https://discourse.cmake.org/t/ninja-multi-config-generator-works-not-really-intuitive/4446/1 "2021-11-07T18:28:13Z")

</div>

**IMHO** in general, a `Ninja Multi-Config` project works not really intuitive:

```bash
bash-3.2$ cmake -G "Ninja Multi-Config" -B ../build -S .
# ...
bash-3.2$ cmake --build ../build --target all
ninja: no work to do.

bash-3.2$ cmake --build ../build --target package:all
ninja: error: 'all:Release', needed by 'CMakeFiles/Release/package.util', missing and no known rule to make it

bash-3.2$ cmake --build ../build --target install:all
ninja: error: 'all:Release', needed by 'CMakeFiles/Release/install.util', missing and no known rule to make it

bash-3.2$ cmake --build ../build --target help
[1/1] All primary targets available:
edit_cache: phony
rebuild_cache: phony
MathFunctions/edit_cache: phony
MathFunctions/rebuild_cache: phony
CMakeFiles/impl-Debug.ninja: RERUN_CMAKE
build-Debug.ninja: RERUN_CMAKE
CMakeFiles/impl-Release.ninja: RERUN_CMAKE
build-Release.ninja: RERUN_CMAKE
CMakeFiles/impl-RelWithDebInfo.ninja: RERUN_CMAKE
build-RelWithDebInfo.ninja: RERUN_CMAKE
build.ninja: RERUN_CMAKE
CMakeFiles/cmake_byproducts_for_clean_target: phony
CMakeFiles/cmake_byproducts_for_clean_target:Debug: phony
CMakeFiles/cmake_byproducts_for_clean_target:Release: phony
CMakeFiles/cmake_byproducts_for_clean_target:RelWithDebInfo: phony
help: HELP
/Users/clausklein/Downloads/cmake/Help/guide/tutorial/build/MathFunctions/Table.h: CUSTOM_COMMAND
MakeTable:Debug: phony
MathFunctions:Debug: phony
SqrtLibrary:Debug: phony
Tutorial:Debug: phony
Tutoriald:Debug: phony
libMathFunctionsd.dylib:Debug: phony
libSqrtLibraryd.a:Debug: phony
package_source: phony
package_source:all: phony
package: phony
package:all: phony
install/local: phony
install/local:all: phony
test: phony
test:all: phony
install/strip: phony
install/strip:all: phony
install: phony
install:all: phony
MathFunctions/install/strip: phony
MathFunctions/install/strip:all: phony
MathFunctions/install: phony
MathFunctions/install:all: phony
MathFunctions/package_source: phony
MathFunctions/package_source:all: phony
MathFunctions/install/local: phony
MathFunctions/install/local:all: phony
MathFunctions/test: phony
MathFunctions/test:all: phony
MathFunctions/package: phony
MathFunctions/package:all: phony
MakeTable: phony
MathFunctions: phony
SqrtLibrary: phony
Tutorial: phony
Tutoriald: phony
libMathFunctionsd.dylib: phony
libSqrtLibraryd.a: phony
all: phony
MathFunctions/all: phony
clean: phony
bash-3.2$ 

```

### Are there some targets missing: i.e. all:all clean:all, … ?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [November 7, 2021, 8:56pm UTC](https://discourse.cmake.org/t/ninja-multi-config-generator-works-not-really-intuitive/4446/2 "2021-11-07T20:56:38Z")

</div>

In your first case, you misspelt the name of the generator. It is `Ninja Multi-Config`, not `Ninja MultiConfig` (note the missing hyphen.

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [November 7, 2021, 9:04pm UTC](https://discourse.cmake.org/t/ninja-multi-config-generator-works-not-really-intuitive/4446/3 "2021-11-07T21:04:04Z")

</div>

Oops, thank you!
