cmake 中的 variables

来源:互联网 发布:新青年网络公开课 编辑:程序博客网 时间:2024/06/06 09:06
  • EXECUTABLE_OUTPUT_PATH 已过时,使用target 属性 RUNTIME_OUTPUT_DIRECTORY 。
  • LIBRARY_OUTPUT_PATH 已过时,使用target 属性 ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, 和 RUNTIME_OUTPUT_DIRECTORY。
  • CMAKE_BUILD_TYPE 构建类型,可能的值有:空, Debug, Release, RelWithDebInfo 和 MinSizeRel。
  • CMAKE_BINARY_DIR This is the full path to the top level of the current CMake build tree.
  • CMAKE_CURRENT_BINARY_DIR This the full path to the build directory that is currently being processed by cmake.
  • PROJECT_BINARY_DIR This is the binary directory of the most recent PROJECT command.
  • [Project name]_BINARY_DIR Top level binary directory for the named project.
  • CMAKE_SOURCE_DIR This is the full path to the top level of the current CMake source tree.
  • CMAKE_CURRENT_SOURCE_DIR This the full path to the source directory that is currently being processed by cmake.
  • PROJECT_SOURCE_DIR This is the source directory of the most recent PROJECT command.
  • [Project name]_SOURCE_DIR Top level source directory for the named project.