目录

CMAKE_VERSION

CMAKE_MAJOR_VERSION

CMAKE_MINOR_VERSION

CMAKE_PATCH_VERSION

CMAKE_TWEAK_VERSION

CMAKE_PROJECT_NAME

CMAKE_BINARY_DIR

CMAKE_SOURCE_DIR

CMAKE_CURRENT_BINARY_DIR

CMAKE_CURRENT_SOURCE_DIR

PROJECT_NAME

PROJECT_VERSION

PROJECT_VERSION_MAJOR

PROJECT_VERSION_MINOR

PROJECT_VERSION_PATCH

PROJECT_VERSION_TWEAK

PROJECT_BINARY_DIR

PROJECT_SOURCE_DIR

<PROJECT_NAME>_VERSION

<PROJECT_NAME>_VERSION_MAJOR

<PROJECT_NAME>_VERSION_MINOR

 <PROJECT_NAME>_VERSION_PATCH

<PROJECT_NAME>_VERSION_TWEAK

<PROJECT_NAME>_SOURCE_DIR

<PROJECT_NAME>_BINARY_DIR

First:

CMAKE_VERSION

The CMake version string as three non-negative integer components separated by . and possibly followed by - and other information. The first two components
represent the feature level and the third component represents either a bug-fix level or development date.
Release versions and release candidate versions of CMake use the format:
<major>.<minor>.<patch>[-rc<n>]
where the <patch> component is less than . Development versions of CMake use the format:
<major>.<minor>.<date>[-<id>]
where the <date> component is of format CCYYMMDD and <id> may contain arbitrary(任意的) text. This represents development as of a particular date following
the <major>.<minor> feature release.

CMAKE_MAJOR_VERSION

CMAKE_MINOR_VERSION

CMAKE_PATCH_VERSION

CMAKE_TWEAK_VERSION

Individual component values of CMAKE_VERSION 

CMAKE_TWEAK_VERSION is defined to 0 for compatibility with code written for older CMake versions that may have defined higher values.Because in CMake versions 2.8.2 through 2.8.12, this variable holds the fourth version number component of the CMAKE_VERSION variable.

CMAKE_BINARY_DIR

The path to the top level of the build tree.
This is the full path to the top level of the current CMake build tree. For an in-source build, this would be the same as CMAKE_SOURCE_DIR.

CMAKE_SOURCE_DIR

The path to the top level of the source tree.
This is the full path to the top level of the current CMake source tree. For an in-source build, this would be the same as CMAKE_BINARY_DIR
顶层CMakeLists.txt文件所在路径。

CMAKE_CURRENT_BINARY_DIR

CMAKE_CURRENT_SOURCE_DIR

#add_subdirectory() will create a binary and a source directory in the build tree, and as it is being processed this variableswill be set. 
add_subdirectory(source_dir [binary_dir])
#Add a subdirectory(子路径) to the build.
#The source_dir specifies the directory in which the source CMakeLists.txt and code files are located.If it is a relative path, it will be evaluated with
#respect to the current directory (the typical usage), but it may also be an absolute path.
#The binary_dir specifies the directory in which to place the output files. If it is a relative path it will be evaluated with respect to the current
#output directory, but it may also be an absolute path. If binary_dir is not specified, the value of source_dir, before expanding any relative path, will
#be used.
#子路径下的CMakeLists.txt执行完之后才会继续执行add_subdirectory()下一条语句子。

Second:

PROJECT_VERSION

Value given to the VERSION option of the most recent call to the project() command, if any.

PROJECT_VERSION_MAJOR

PROJECT_VERSION_MINOR

PROJECT_VERSION_PATCH

PROJECT_VERSION_TWEAK

First version number component of the PROJECT_VERSION variable as set by the project() command.
Second...
...

PROJECT_BINARY_DIR

Full path to build directory for project.
This is the binary directory of the most recent project() command.

PROJECT_SOURCE_DIR

Top level source directory for the current project.
This is the source directory of the most recent project() command.

Third:

PROJECT_NAME

#The name of the current project.
#This specifies name of the current project from the closest inherited project() command.
project(<PROJECT_NAME> [LANGUAGES] [<language-name>...])

<PROJECT_NAME>_VERSION

Value given to the VERSION option of the most recent call to the project() command with project name <PROJECT-NAME>, if any.

<PROJECT_NAME>_VERSION_MAJOR

<PROJECT_NAME>_VERSION_MINOR

<PROJECT_NAME>_VERSION_PATCH

<PROJECT_NAME>_VERSION_TWEAK

...

<PROJECT_NAME>_SOURCE_DIR

<PROJECT_NAME>_BINARY_DIR

Top level source directory for the named project.
Top level binary directory for the named project.
A variable is created with the name used in the project() command, and is the source directory and binary directory for the project. This can be useful
when add_subdirectory() is used to connect several projects.

CMake变量(提供信息的变量)的更多相关文章

  1. cmake 常用变量和常用环境变量查表手册---整理 .

    一,cmake 变量引用的方式: 前面我们已经提到了,使用${}进行变量的引用.在 IF 等语句中,是直接使用变量名而不通过${}取值 二,cmake 自定义变量的方式: 主要有隐式定义和显式定义两种 ...

  2. cmake 常用变量和常用环境变量查表手册

    cmake 常用变量和常用环境变量查表手册 一,cmake 变量引用的方式: 前面我们已经提到了,使用${}进行变量的引用.在 IF 等语句中,是直接使用变量名而不通过${}取值 二,cmake 自定 ...

  3. Java反射理解(四)-- 获取成员变量构造函数信息

    Java反射理解(四)-- 获取成员变量构造函数信息 步骤 获取成员变量信息: obj.getClass() 获取类类型对象 成员变量也是对象,java.lang.reflect.Field 类中封装 ...

  4. CMake中的两种变量(Variable types in CMake)

    在CMake中存在两种变量:normal variables and cache varialbes .正常变量就像是脚本内部变量,相当于程序设计中定义的局部变量那样.而CMakeLists.txt相 ...

  5. 报警视图 报警窗口 报警指示器 的组态 PLC变量 事故信息 MW16 报警确认变量 MW18 转速变量 MW20 温度变量 MW22 用 M17.0 来模拟事故信息的最低位。用PLCSIM 给定温度为800 度 报警视图与报警窗口显示故障

    组态报警并用PLCSIM进行仿真 步骤1 : 组态离散变量报警 在PLC 的默认变量表中 创建变量"事故信息" 数据类型是word 绝对地址是MW16 同时建立 报警确认变量 MW ...

  6. Paip.最佳实践-- Buildin variale 内建变量 ,魔术变量,预定义变量,系统常量,系统变量 1

    Paip.最佳实践-- Buildin variale 内建变量 ,魔术变量,预定义变量,系统常量,系统变量 1.1.1       C++内建变量(__LINE__).... 1.1.2       ...

  7. 通过lua获取nginx的内置变量,通过这些变量做些逻辑的处理

    Nginx提供了很多内置的变量,如: $arg_PARAMETER 这个变量包含在查询字符串时GET请求PARAMETER的值. $args 这个变量等于请求行中的参数. $binary_remote ...

  8. 007.Ansible变量Fact,魔法变量和lookup生成变量

    一 fact变量 1.1  fact简介 ansible有一个模块叫setup,用于获取远程主机的相关信息,并可以将这些信息作为变量在playbook里进行调用.而setup模块获取这些信息的方法就是 ...

  9. 深入理解PHP内核(九)变量及数据类型-静态变量

    原文链接:http://www.orlion.ga/251/ 通常静态变量是静态分配的,他们的生命周期和程序的生命周期一样长,只有在程序退出后才结束生命周期,这和局部变量相反,有的语言中全局变量也是静 ...

随机推荐

  1. 被疯狂吐槽的iPhoneXR屏幕真如传言中的那么差吗?

    在双十一期间,最受果粉关注的电商平台不是天猫,也不是京东,而是拼多多!原因很简单,拼多多疯狂给出iPhone的各种超低价格,直接压制了竞争对手.以iPhone XR为例,依据容量不同,价格分别为558 ...

  2. ubuntu18.04.2 hadoop3.1.2+zookeeper3.5.5高可用完全分布式集群搭建

    ubuntu18.04.2 hadoop3.1.2+zookeeper3.5.5高可用完全分布式集群搭建 集群规划: hostname NameNode DataNode JournalNode Re ...

  3. Java中定义常量(Constant) 的几种方法

    为了方便大家交流Spark大数据,浪尖建了微信群,目前人数过多,只能通过浪尖或者在群里的朋友拉入群.纯技术交流,偶有吹水,但是打广告,不提醒,直接踢出.有兴趣加浪尖微信. 常量使用目的 1,为什么要将 ...

  4. [ACTF2020 新生赛]Exec

    0x00 知识点 命令执行 这里见了太多了..以前也写过: https://www.cnblogs.com/wangtanzhi/p/12246386.html 命令执行的方法大抵是加上管道符或者分号 ...

  5. zabbix_server

    http://www.linuxidc.com/Linux/2014-11/109909.htm [root@localhost zabbix]# service iptables stop  关闭i ...

  6. cf 187B.AlgoRace

    floyd...太神奇了(不会floyd(大雾)) 貌似floyd的外层k是保证最短路从起点逐渐向外扩展(而不是乱搞233) 所以在处理f[i][j]=min(f[i][j],f[i][k]+f[k] ...

  7. java课程之团队开发冲刺阶段2.10

    总结昨天任务: 1.已经完成修改APP等操作 遇到的困难: 1.在不同的Android版本中,APP的图标有出入 今天的任务: 最后一天,怀念一下,第二阶段结束了,课程也进入了尾声.

  8. iOS下JS与原生的交互二

    本篇主要讲的是UIWebView和JS的交互,UIWebView和JS交互的详解https://www.cnblogs.com/llhlj/p/6429431.html 一. WKWebView调用J ...

  9. [题解] LuoguP4841 [集训队作业2013]城市规划

    Description 求\(n\)个点无重边.无自环.带标号的无向联通图个数,对\(1004535809\)(\(479 \times 2^{21} + 1\))取模.\(n \le 130000\ ...

  10. bugku-杂项 convert

    打开题目文件,一大堆01码,用py转换成hex f=open("in.txt","r") print hex(int(str(f.read()),2)) f.c ...