# Would like to disable cmake dev warning

**URL:** https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450
**Category:** Usage
**Created:** [January 1, 2021, 7:41pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450 "2021-01-01T19:41:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![boxerab](https://discourse.cmake.org/user_avatar/discourse.cmake.org/boxerab/32/718_2.png) [@boxerab](https://discourse.cmake.org/u/boxerab)
#### Post date: [January 1, 2021, 7:41pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/1 "2021-01-01T19:41:14Z")

</div>

My cmake script searches for Perl libs, but I get the following warning message:

```auto
CMake Warning (dev) at cmake-install/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (Perl) does
  not match the name of the calling package (PerlLibs). This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake-install/share/cmake-3.17/Modules/FindPerl.cmake:76 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake-install/share/cmake-3.17/Modules/FindPerlLibs.cmake:48 (include)
  CMakeLists.txt:208 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

```

How can I disable this? Not sure where I need to put `-Wno-dev`

---

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [January 1, 2021, 7:57pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/2 "2021-01-01T19:57:48Z")

</div>

You can disable the warning like this when you are configuring your build.

[-Wno-dev](https://cmake.org/cmake/help/latest/manual/cmake.1.html?highlight=cmake%20cli#generate-a-project-buildsystem)

Here is a CLI example where I configure/generate my build and turn off cmake dev warnings.

```auto
cmake -S . -B build -Wno-dev

```

---

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [January 1, 2021, 7:59pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/3 "2021-01-01T19:59:00Z")

</div>

However, when it comes to just silencing warnings. It’s better to just fix the actual problem. Build code needs to maintained and fixed just like any other code.

Silencing warnings permanently is just asking for problems down the road.

---

<div class="post-metadata">

### Author: ![boxerab](https://discourse.cmake.org/user_avatar/discourse.cmake.org/boxerab/32/718_2.png) [@boxerab](https://discourse.cmake.org/u/boxerab)
#### Post date: [January 1, 2021, 8:01pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/4 "2021-01-01T20:01:47Z")

</div>

Thanks, @anon45792294 ! How can I silence the warning if this is happening inside the cmake find\_package code for PerlLibs ?

---

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [January 1, 2021, 8:08pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/5 "2021-01-01T20:08:40Z")

</div>

Depends.

- It could be user error: You could be using find\_package incorrectly. Or your cmake code could just be wrong.
- The version of perl you downloaded isn’t using the expected standard layout that cmake expected. I had this happen when someone mangled python at my company in a bizzare way…
- The official cmake support for [perl](https://cmake.org/cmake/help/latest/search.html?q=perl) could be wrong (unlikely, but possible).

Whatever the case is. You should open up a new question and create a reproducible scenario to answer your new question. Otherwise it’s a painful guessing game.

---

<div class="post-metadata">

### Author: ![boxerab](https://discourse.cmake.org/user_avatar/discourse.cmake.org/boxerab/32/718_2.png) [@boxerab](https://discourse.cmake.org/u/boxerab)
#### Post date: [January 1, 2021, 8:23pm UTC](https://discourse.cmake.org/t/would-like-to-disable-cmake-dev-warning/2450/6 "2021-01-01T20:23:09Z")

</div>

Thanks. this issue happens on my CI. The CI runs on windows, osx and ubuntu, but the warning only appears on ubuntu. So, it may be a configuration issue. Or it may be related to the cmake version on Ubuntu (3.17). I am happy to simply suppress with `-Wno-dev`
