# Unknown arguments specified

**URL:** <https://discourse.cmake.org/t/unknown-arguments-specified/10313>\
**Category:** Code\
**Created:** [March 7, 2024, 6:28am UTC](https://discourse.cmake.org/t/unknown-arguments-specified/10313 "2024-03-07T06:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maiya](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@maiya](https://discourse.cmake.org/u/maiya)\
**Post date:** [March 7, 2024, 6:28am UTC](https://discourse.cmake.org/t/unknown-arguments-specified/10313/1 "2024-03-07T06:28:22Z")

</div>

Hi community,

```auto
CMake Error at CMakeLists.txt:13 (if):
  if given arguments:

    "3.5.1" "VERSION_GREATER_EQUAL" "3.12"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

```

getting the above error while compiling the cmake code.

here is my cmake code.

```auto
# See https://cmake.org/cmake/help/v3.12/policy/CMP0074.html required by certain
# version of zlib which CURL depends on.
if("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.12")
  cmake_policy(SET CMP0074 NEW)
endif()

```

any help would really appreciated.

Tried with the below code also, but then getting the same error.

```auto
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
  cmake_policy(SET CMP0074 NEW)
endif()

```

Thank you.  
Regards,  
Maiya

---

<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:** [March 7, 2024, 7:40am UTC](https://discourse.cmake.org/t/unknown-arguments-specified/10313/2 "2024-03-07T07:40:10Z")

</div>

What version of CMake are you using? The `VERSION_GREATER_EQUAL` expression requires at least CMake 3.7.

---

<div class="post-metadata">

**Author:** ![maiya](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@maiya](https://discourse.cmake.org/u/maiya)\
**Post date:** [March 7, 2024, 7:48am UTC](https://discourse.cmake.org/t/unknown-arguments-specified/10313/3 "2024-03-07T07:48:37Z")

</div>

its 3.5.1. However, why unknown arguments specified am getting?  
Since it is value if that condition succeeds then control go inside the condition otherwise not. But here am getting unown arguments specified. I just wonder the way we specified in that condition is might be wrong? not the value of cmake version itself, which I believe.

Please correct me if I am wrong.

---

<div class="post-metadata">

**Author:** ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)\
**Post date:** [March 21, 2024, 4:02pm UTC](https://discourse.cmake.org/t/unknown-arguments-specified/10313/4 "2024-03-21T16:02:48Z")

</div>

As Craig said, the operator `VERSION_GREATER_EQUAL` was introduced in CMake 3.7. So when CMake 3.5.1 is parsing the `if()` command, it doesn’t recognise that arugment and so it reports an unknown argument error.

If you need to support CMake so ancient, you can reword the condition using `NOT` and `VERSION_LESS`.
