# Improve error message?

**URL:** https://discourse.cmake.org/t/improve-error-message/8118
**Category:** Development
**Created:** [May 13, 2023, 12:38pm UTC](https://discourse.cmake.org/t/improve-error-message/8118 "2023-05-13T12:38:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Freed-Wu](https://discourse.cmake.org/user_avatar/discourse.cmake.org/freed-wu/32/3347_2.png) [@Freed-Wu](https://discourse.cmake.org/u/Freed-Wu)
#### Post date: [May 13, 2023, 12:38pm UTC](https://discourse.cmake.org/t/improve-error-message/8118/1 "2023-05-13T12:38:29Z")

</div>

[https://stackoverflow.com/a/30264765/16027269](https://stackoverflow.com/a/30264765/16027269):

> This is one of those examples where a simple note could make a developers live so much easier. No tests were found!!! Did you define enable\_testing() before add\_subdirectory()? –  
> lanoxx

How about improving error message?

---

<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: [May 13, 2023, 1:05pm UTC](https://discourse.cmake.org/t/improve-error-message/8118/2 "2023-05-13T13:05:03Z")

</div>

CTest has no idea what’s going on, but I think this is probably quite a common reason (others being things like `-L nosuchlabel` or `-R matchesnothing`). I think if CTest sees _zero_ tests defined that a note like this is probably appropriate.

---

<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: [May 17, 2023, 12:21pm UTC](https://discourse.cmake.org/t/improve-error-message/8118/3 "2023-05-17T12:21:46Z")

</div>

Issue filed: [https://gitlab.kitware.com/cmake/cmake/-/issues/24924](https://gitlab.kitware.com/cmake/cmake/-/issues/24924)
