加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

cmake--变量---目录

发布时间:2020-12-14 04:33:49 所属栏目:大数据 来源:网络整理
导读: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
  • 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 currently being processed.
  • CMAKE_CURRENT_LIST_DIR : (since 2.8.3) this is the directory of the listfile currently being processed.
  • CMAKE_CURRENT_LIST_LINE : this is linenumber where the variable is used.
  • CMAKE_FILES_DIRECTORY : the directory within the current binary directory that contains all the CMake generated files. Typically evaluates to "/CMakeFiles". Note the leading slash for the directory. Typically used with the current binary directory,i.e. ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}
  • CMAKE_MODULE_PATH : tell CMake to search first in directories listed in CMAKE_MODULE_PATH when you use FIND_PACKAGE() or INCLUDE() SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/MyCMakeScripts) FIND_PACKAGE(HelloWorld)
  • CMAKE_ROOT : this is the CMake installation directory
  • CMAKE_SOURCE_DIR : this is the directory which contains the top-level CMakeLists.txt,i.e. the top level source directory
  • PROJECT_NAME : the name of the project set by PROJECT() command.
  • CMAKE_PROJECT_NAME : the name of the first project set by the PROJECT() command,i.e. the top level project.
  • PROJECT_BINARY_DIR : contains the full path to the top level directory of your build tree
  • PROJECT_SOURCE_DIR : contains the full path to the root of your project source directory,i.e. to the nearest directory where CMakeLists.txt contains the PROJECT() command

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读