# Use case for the "const" condition type

**URL:** https://discourse.cmake.org/t/use-case-for-the-const-condition-type/3856
**Category:** Usage
**Created:** [July 31, 2021, 5:55am UTC](https://discourse.cmake.org/t/use-case-for-the-const-condition-type/3856 "2021-07-31T05:55:20Z")
**Posts on this page:** 3
**Page:** 1

<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: [July 31, 2021, 5:55am UTC](https://discourse.cmake.org/t/use-case-for-the-const-condition-type/3856/1 "2021-07-31T05:55:21Z")

</div>

Just curious if there was a particular use case in mind for the `"const"` type in a condition object? I’m struggling to see how it serves any useful purpose, especially given that it does not even support macro evaluation. Either you hard-code a value of `true`, in which case you may as well not have the condition at all, or you hard-code a value of `false` and the preset will never be enabled. About the only thing I can think of is if you want to temporarily force a condition to evaluate to a particular value while you are debugging something, but that seems like a strange thing to support in the formal schema. Am I missing something?

CC: @kyle.edwards

---

<div class="post-metadata">

### Author: ![silverqx](https://discourse.cmake.org/user_avatar/discourse.cmake.org/silverqx/32/2353_2.png) [@silverqx](https://discourse.cmake.org/u/silverqx)
#### Post date: [December 21, 2024, 1:15pm UTC](https://discourse.cmake.org/t/use-case-for-the-const-condition-type/3856/2 "2024-12-21T13:15:02Z")

</div>

Now I’ve also come into this and wondering what is the point of that. I don’t see any use cases.

---

<div class="post-metadata">

### Author: ![silverqx](https://discourse.cmake.org/user_avatar/discourse.cmake.org/silverqx/32/2353_2.png) [@silverqx](https://discourse.cmake.org/u/silverqx)
#### Post date: [December 21, 2024, 1:24pm UTC](https://discourse.cmake.org/t/use-case-for-the-const-condition-type/3856/3 "2024-12-21T13:24:17Z")

</div>

I think I got it, it’s the same as `if(false)` or `if(true)`, and it’s handy eg. in vcpkg patches, you can see it there a lot if you need to disable some code part in the build system but you don’t want to remove it entirely, eg. to avoid/minimize potential merge conflicts or to preserve code logic for fast lookup what’s up.
