最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to get a list of components for cmake install - Stack Overflow

programmeradmin7浏览0评论

cmake can describe components of project and install by one. I need to get a list of components in current project.

I can insall one component of a cmake project by run cmake --install . --component <name>

Is there a way for lists all compoents in a cmake poject?

Something like

cmake --install . --list-components

return

<name1>
<name2>
<name3>
...

cmake can describe components of project and install by one. I need to get a list of components in current project.

I can insall one component of a cmake project by run cmake --install . --component <name>

Is there a way for lists all compoents in a cmake poject?

Something like

cmake --install . --list-components

return

<name1>
<name2>
<name3>
...
Share Improve this question asked Feb 5 at 6:04 VasiliiVasilii 211 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

Search all CMakeLists.txt file for COMPONENT and the name after it is a installable comonent.

Components are explicitly defined for install command by adding COMPONENT <component_name>.

发布评论

评论列表(0)

  1. 暂无评论