cmake-列表无法识别子命令FILTER [英] cmake - list does not recognize sub-command FILTER

查看:84
本文介绍了cmake-列表无法识别子命令FILTER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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?

在ubuntu上。它的最新版本是从官方ubuntu存储库中获得的。

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

在Mac上使用3.6.2版本可以正常工作

Its working fine on Mac with version 3.6.2

提供此功能的最少的cmake版本是什么?

What is the least cmake version that offers this?

推荐答案

这是可以预期的, list (过滤器在CMake 3.6中引入。

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

这篇关于cmake-列表无法识别子命令FILTER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆