# ctest --preset=ninja-multi --config Release does not work?

**URL:** https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378
**Category:** Code
**Created:** [April 5, 2022, 2:18pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378 "2022-04-05T14:18:52Z")
**Posts on this page:** 5
**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: [April 5, 2022, 2:18pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378/1 "2022-04-05T14:18:53Z")

</div>

```bash
bash-3.2$ ctest --preset=ninja-multi --config Release 
Test project /Users/clausklein/Workspace/cpp/ModernCmakeStarter/build/ninja-multi
    Start 1: GreeterTests
Test not available without configuration. (Missing "-C <config>"?)
1/1 Test #1: GreeterTests .....................***Not Run 0.00 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 0.10 sec

The following tests FAILED:
	  1 - GreeterTests (Not Run)
Errors while running CTest

```

but this works:

```bash
bash-3.2$ cmake --build --preset=ninja-multi --config Release --target test
[0/1] Running tests...
Test project /Users/clausklein/Workspace/cpp/ModernCmakeStarter/build/ninja-multi
    Start 1: GreeterTests
1/1 Test #1: GreeterTests ..................... Passed 0.60 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) = 0.62 sec
bash-3.2$ 

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 5, 2022, 2:33pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378/2 "2022-04-05T14:33:53Z")

</div>

`ctest` takes a `-C` option, not `--config` IIRC.

---

<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: [April 5, 2022, 2:44pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378/3 "2022-04-05T14:44:50Z")

</div>

Thanks, but `ctest` should have better the same long form `--config` argument, or not?

```bash
bash-3.2$ ctest --preset=ninja-multi --build-config Release 
Test project /Users/clausklein/Workspace/cpp/ModernCmakeStarter/build/ninja-multi
    Start 1: GreeterTests
1/1 Test #1: GreeterTests ..................... Passed 0.09 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) = 0.10 sec
bash-3.2$ 

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 5, 2022, 5:19pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378/4 "2022-04-05T17:19:54Z")

</div>

That sounds like a good request to me. @robert.maynard has the CTest command line had a refresh/tightening up that CMake did?

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [April 5, 2022, 5:57pm UTC](https://discourse.cmake.org/t/ctest-preset-ninja-multi-config-release-does-not-work/5378/5 "2022-04-05T17:57:20Z")

</div>

No only `cmake`, `cmake --build`, and `cmake --install` use the new command line parsing rules.
