cmake--变量---目录

本文介绍了CMake中的一些重要变量,如CMAKE_BINARY_DIR、CMAKE_COMMAND、CMAKE_CURRENT_BINARY_DIR等,这些变量在构建过程和源码管理中起到关键作用。了解这些变量可以帮助更好地理解和使用CMake。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • CMAKE_BINARY_DIR : if you are building in-source, this is the same as CMAKE_SOURCE_DIR, otherwise this is the top level directory of your build tree
  • CMAKE_COMMAND : this is the complete path of the cmake which runs currently (e.g. /usr/local/bin/cmake). Note that if you have custom commands that invoke cmake -E, it is very important to use CMAKE_COMMAND as the CMake executable, because CMake might not be on the system PATH.
  • CMAKE_CURRENT_BINARY_DIR : if you are building in-source, this is the same as CMAKE_CURRENT_SOURCE_DIR, otherwise this is the directory where the compiled or generated files from the current CMakeLists.txt will go to.
  • CMAKE_CURRENT_SOURCE_DIR : this is the directory where the currently processed CMakeLists.txt is located in
  • CMAKE_CURRENT_LIST_FILE : this is the full path to the listfile curren
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值