cmake--变量---目录

  • 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

相关文章

自1998年我国取消了福利分房的政策后,房地产市场迅速开展蓬...
文章目录获取数据查看数据结构获取数据下载数据可以直接通过...
网上商城系统MySql数据库设计
26个来源的气象数据获取代码
在进入21世纪以来,中国电信业告别了20世纪最后阶段的高速发...