cmake include_directories分析

自动化编译这几天快把我折磨透了,好烦,但是还要加班来搞,现在静下来慢慢分析:

看官方文档解释:

  • include_directories: 编译时加到包含目录
  •   include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)
    

    Add the given directories to those the compiler uses to search for include files. These directories are added to the directory property INCLUDE_DIRECTORIES for the current CMakeLists file. They are also added to the target property INCLUDE_DIRECTORIES for each target in the current CMakeLists file. The target property values are the ones used by the generators.

    By default the directories are appended onto the current list of directories. This default behavior can be changed by setting CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. By using AFTER or BEFORE explicitly, you can select between appending and prepending, independent of the default. If the SYSTEM option is given, the compiler will be told the directories are meant as system include directories on some platforms.

  • 增加指定目录给指定编译器去搜索包含文件。这些目录被当前CMakeLists文件以INCLUDE_DIRECTORIES 来加进文件属性。他们也被


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值