10
cmake --version
cmake version 3.5.2

list(FILTER HEADERS EXCLUDE REGEX "^\\..+")

CMake Error at CMakeLists.txt:49 (list):
  list does not recognize sub-command FILTER

Is it problem with version I am using?

Its on ubuntu. Its the latest version one gets from the official ubuntu repository.

Its working fine on Mac with version 3.6.2

What is the least cmake version that offers this?

0

1 Answer 1

12

That is to be expected, list(FILTER was introduced in CMake 3.6.

https://cmake.org/cmake/help/v3.5/command/list.html https://cmake.org/cmake/help/v3.6/command/list.html

3
  • Why does sudo apt-get install cmake says I have the latest cmake 3.5.1 version then? ._. Commented Jan 29, 2021 at 23:32
  • Because you are using an almost five years old Ubuntu? packages.ubuntu.com/xenial/cmake
    – usr1234567
    Commented Jan 30, 2021 at 18:58
  • Alright, yes. That was the problem. Although If I hadn't tried to install the new version of cmake on the obsolete x32 bit linux virtual machine, I wouldn't have known isn't supported anymore. Commented Jan 31, 2021 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.