# Help/command/if: list all condition operators in precedence order list

**URL:** https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509
**Category:** Development
**Created:** [August 22, 2024, 3:18pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509 "2024-08-22T15:18:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Lex-2008](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lex-2008/32/4874_2.png) [@Lex-2008](https://discourse.cmake.org/u/Lex-2008)
#### Post date: [August 22, 2024, 3:18pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/1 "2024-08-22T15:18:33Z")

</div>

I believe there might be other people, not only me, who, when first opened documentation for `if()` command, saw list of condition operators in “Condition Syntax” section, and wrongfully assumed that they are the only checks that CMake supports. I wonder if it worth adding all documented checks to that list?

I failed to create merge request, but maybe I can post [a link to my commit](https://gitlab.kitware.com/Lex-2008/cmake/-/commit/91f6e10ba926b6ee2ad308b448ac786a14194031) here, in case someone wants to take it.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [August 22, 2024, 3:33pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/2 "2024-08-22T15:33:37Z")

</div>

Thanks. I cherry-picked your commit to create [CMake MR 9767](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9767).

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [August 22, 2024, 3:36pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/3 "2024-08-22T15:36:59Z")

</div>

> [@Lex-2008](#):
>
> I failed to create merge request

You’ve correctly pushed the branch to your fork. You should be able to visit your fork’s page on GitLab, click on the “Merge Requests” section on the left, and then see a button to create a new merge request.

---

<div class="post-metadata">

### Author: ![Lex-2008](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lex-2008/32/4874_2.png) [@Lex-2008](https://discourse.cmake.org/u/Lex-2008)
#### Post date: [August 22, 2024, 6:04pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/4 "2024-08-22T18:04:41Z")

</div>

Thank you for the prompt reply and picking my commit!

And sorry I probably should’ve been more specific: When I filled out the form to create MR, gitlab told me: “Your merge request has been recognized as spam” (picture attached). Tried rewording my commit message twice with same result. Tried to create an issue with a text similar to first message in this thread - received a similar reply (no picture this time, sorry). Not sure if antispam got triggered by some words in the message or by the age of my few-minutes-old account, but good that you have more ways to communicate! 😅

 ![mr-spam](https://discourse.cmake.org/uploads/default/original/2X/5/52c23e7e6fed151f2611f0e6b4356c7249d85647.png)

---

<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: [July 19, 2025, 2:22pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/5 "2025-07-19T14:22:48Z")

</div>

> [@Lex-2008](#):
>
> “Your merge request has been recognized as spam”

I’ll note that since then, your account has been marked as “trusted”.

---

<div class="post-metadata">

### Author: ![Lex-2008](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lex-2008/32/4874_2.png) [@Lex-2008](https://discourse.cmake.org/u/Lex-2008)
#### Post date: [July 19, 2025, 3:26pm UTC](https://discourse.cmake.org/t/help-command-if-list-all-condition-operators-in-precedence-order-list/11509/6 "2025-07-19T15:26:44Z")

</div>

Thank you! I’m more a CMake _user_ rather then _developer_, but I’ll keep that in mind if i see something else i can contribute with!
