# Option to hide non-crucial deprecation warnings

**URL:** https://discourse.cmake.org/t/option-to-hide-non-crucial-deprecation-warnings/15133
**Category:** Development
**Created:** [August 30, 2025, 8:47am UTC](https://discourse.cmake.org/t/option-to-hide-non-crucial-deprecation-warnings/15133 "2025-08-30T08:47:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Andrej730](https://discourse.cmake.org/user_avatar/discourse.cmake.org/andrej730/32/5752_2.png) [@Andrej730](https://discourse.cmake.org/u/Andrej730)
#### Post date: [August 30, 2025, 8:47am UTC](https://discourse.cmake.org/t/option-to-hide-non-crucial-deprecation-warnings/15133/1 "2025-08-30T08:47:12Z")

</div>

Consider example below:

```cmake

cmake_minimum_required(VERSION 3.5)
project(HelloInstall)

if(POLICY CMP0060) # 3.3
cmake_policy(SET CMP0060 OLD)
endif()

if(POLICY CMP0129) # 3.23
cmake_policy(SET CMP0129 OLD)
endif()

if(POLICY CMP0130) # 3.24
cmake_policy(SET CMP0130 NEW)
endif()

add_executable(hello main.cpp)
install(TARGETS hello DESTINATION bin)

```

In cmake 3.31 I get warning on using `CMP0129=OLD` behaviour.

Let’s say I still have users with older cmake (\<=3.23) and then I want to keep it as `OLD`.

So the only way for me to disable it is to use `CMAKE_WARN_DEPRECATED=OFF`. But there are couple downsides:

- it will disable `cmake_minimum_required` check, which is very important, since 3.5 compatibility already removed completely

- it will hide `CMP0060` warning, which is also very important, since this policy goes away with 3.5

Would be great to have some way to disable non-crucial deprecation warnings.

Also, maybe a dumb question, but shouldn’t policies removal coincide with general cmake version compatibility removal? And if I have `cmake_minimum_required(VERSION 3.10)`, which is still compatible cmake version, I shouldn’t get any warnings about using OLD behaviour from cmake policies added in cmake 3.10+.
