首页 > CMake > CMake-cmd查询语法
2014九月14

CMake-cmd查询语法

只需使用以下命令即可 :

cmake –help
cmake –help-command-list
cmake –help-command xxx
cmake –help-variable-list
cmake –help-variable yyy
如cmake –help-command set

示例:(当然,前提你要把cmake的路径加入环境变量)

C:\Users\Administrator>cmake --help-command set
set
---
 
Set a CMake, cache or environment variable to a given value.
 
::
 
 set(<variable> <value>
	 [[CACHE <type> <docstring> [FORCE]] ¦ PARENT_SCOPE])
 
Within CMake sets <variable> to the value <value>.  <value> is
expanded before <variable> is set to it.  Normally, set will set a
regular CMake variable.  If CACHE is present, then the <variable> is
put in the cache instead, unless it is already in the cache.  See
section 'Variable types in CMake' below for details of regular and
cache variables and their interactions.  If CACHE is used, <type> and
<docstring> are required.  <type> is used by the CMake GUI to choose a
widget with which the user sets a value.  The value for <type> may be
one of
 
::
 
 FILEPATH = File chooser dialog.
 PATH	 = Directory chooser dialog.
 STRING   = Arbitrary string.
 BOOL	 = Boolean ON/OFF checkbox.
 INTERNAL = No GUI entry (used for persistent variables).
 
If <type> is INTERNAL, the cache variable is marked as internal, and
will not be shown to the user in tools like cmake-gui.  This is
intended for values that should be persisted in the cache, but which
users should not normally change.  INTERNAL implies FORCE.
 
Normally, set(...CACHE...) creates cache variables, but does not
modify them.  If FORCE is specified, the value of the cache variable
is set, even if the variable is already in the cache.  This should
normally be avoided, as it will remove any changes to the cache
variable's value by the user.

文章作者:hgy413
本文地址:http://hgy413.com/1701.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

本文的评论功能被关闭了.