[cmake-commits] king committed CMakeCommands.html 1.50 1.51

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 26 06:00:14 EDT 2007


Update of /cvsroot/CMake/CMakeWeb/HTML
In directory public:/mounts/ram/cvs-serv24115

Modified Files:
	CMakeCommands.html 
Log Message:
STYLE: Documentation update.


Index: CMakeCommands.html
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/CMakeCommands.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- CMakeCommands.html	18 Sep 2007 19:41:30 -0000	1.50
+++ CMakeCommands.html	26 Oct 2007 10:00:11 -0000	1.51
@@ -1,4 +1,4 @@
-<h2>Documentation for Commands of CMake 2.4-patch 7</h2>
+<h2></h2>
 <ul>
   <li>
     <b><code>ADD_CUSTOM_COMMAND</code></b>: Add a custom build rule to the generated build system.<br>
@@ -132,10 +132,10 @@
   </li>
   <li>
     <b><code>FILE</code></b>: File manipulation command.<br>
-    <pre>  FILE(WRITE filename "message to write"... )<br>  FILE(APPEND filename "message to write"... )<br>  FILE(READ filename variable)<br>  FILE(GLOB variable [RELATIVE path] [globbing expressions]...)<br>  FILE(GLOB_RECURSE variable [RELATIVE path] <br>       [globbing expressions]...)<br>  FILE(REMOVE [directory]...)<br>  FILE(REMOVE_RECURSE [directory]...)<br>  FILE(MAKE_DIRECTORY [directory]...)<br>  FILE(RELATIVE_PATH variable directory file)<br>  FILE(TO_CMAKE_PATH path result)<br>  FILE(TO_NATIVE_PATH path result)<br></pre>
+    <pre>  FILE(WRITE filename "message to write"... )<br>  FILE(APPEND filename "message to write"... )<br>  FILE(READ filename variable)<br>  FILE(GLOB variable [RELATIVE path] [globbing expressions]...)<br>  FILE(GLOB_RECURSE variable [RELATIVE path] <br>       [globbing expressions]...)<br>  FILE(REMOVE [file1 ...])<br>  FILE(REMOVE_RECURSE [file1 ...])<br>  FILE(MAKE_DIRECTORY [directory1 directory2 ...])<br>  FILE(RELATIVE_PATH variable directory file)<br>  FILE(TO_CMAKE_PATH path result)<br>  FILE(TO_NATIVE_PATH path result)<br></pre>
     <p>WRITE will write a message into a file called 'filename'. It overwrites the file if it already exists, and creates the file if it does not exist.<br><p>APPEND will write a message into a file same as WRITE, except it will append it to the end of the file<br><p>NOTE: When using FILE WRITE and FILE APPEND, the produced file cannot be used as an input to CMake (CONFIGURE_FILE, source file ...) because it will lead to an infinite loop. Use CONFIGURE_FILE if you want to generate input files to CMake.<br><p>READ will read the content of a file and store it into the variable.<br><p>GLOB will generate a list of all files that match the globbing expressions and store it into the variable. Globbing expressions are similar to regular expressions, but much simpler. If RELATIVE flag is specified for an expression, the results will be returned as a relative path to the given path.<br><p>Examples of globbing expressions include:<br><pre>   *.cxx      - match all files with extension cxx<br>   *.vt?      - match all files with extension vta,...,vtz<br>   f[3-5].txt - match files f3.txt, f4.txt, f5.txt<br></pre>
     <p>GLOB_RECURSE will generate similar list as the regular GLOB, except it will traverse all the subdirectories of the matched directory and match the files.<br><p>Examples of recursive globbing include:<br><pre>   /dir/*.py  - match all python files in /dir and subdirectories<br></pre>
-    <p>MAKE_DIRECTORY will create a directory at the specified location<br><p>RELATIVE_PATH will determine relative path from directory to the given file.<br><p>TO_CMAKE_PATH will convert path into a cmake style path with unix /.  The input can be a single path or a system path like "$ENV{PATH}".  Note the double quotes around the ENV call TO_CMAKE_PATH only takes  one argument.<br><p>TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from  a cmake style path into the native path style \ for windows and / for UNIX.
+    <p>MAKE_DIRECTORY will create the given directories, also if their parent directories don't exist yet<br><p>REMOVE will remove the given files, also in subdirectories<br><p>REMOVE_RECURSE will remove the given files and directories, also non-empty directories<br><p>RELATIVE_PATH will determine relative path from directory to the given file.<br><p>TO_CMAKE_PATH will convert path into a cmake style path with unix /.  The input can be a single path or a system path like "$ENV{PATH}".  Note the double quotes around the ENV call TO_CMAKE_PATH only takes  one argument.<br><p>TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from  a cmake style path into the native path style \ for windows and / for UNIX.
   </li>
   <li>
     <b><code>FIND_FILE</code></b>: Find the full path to a file.<br>
@@ -165,7 +165,7 @@
   </li>
   <li>
     <b><code>FIND_PACKAGE</code></b>: Load settings for an external project.<br>
-    <pre>  FIND_PACKAGE(&lt;name&gt; [major.minor] [QUIET] [NO_MODULE]<br>               [[REQUIRED|COMPONENTS] [componets...]])<br></pre>
+    <pre>  FIND_PACKAGE(&lt;name&gt; [major.minor] [QUIET] [NO_MODULE]<br>               [[REQUIRED|COMPONENTS] [components...]])<br></pre>
     <p>Finds and loads settings from an external project.  &lt;name&gt;_FOUND will be set to indicate whether the package was found.  Settings that can be used when &lt;name&gt;_FOUND is true are package-specific.  The package is found through several steps.  Directories listed in CMAKE_MODULE_PATH are searched for files called "Find&lt;name&gt;.cmake".  If such a file is found, it is read and processed by CMake, and is responsible for finding the package.  This first step may be skipped by using the NO_MODULE option.  If no such file is found, it is expected that the package is another project built by CMake that has a "&lt;name&gt;Config.cmake" file.  A cache entry called &lt;name&gt;_DIR is created and is expected to be set to the directory containing this file.  If the file is found, it is read and processed by CMake to load the settings of the package.  If &lt;name&gt;_DIR has not been set during a configure step, the command will generate an error describing the problem unless the QUIET argument is specified.  If &lt;name&gt;_DIR has been set to a directory not containing a "&lt;name&gt;Config.cmake" file, an error is always generated.  If REQUIRED is specified and the package is not found, a FATAL_ERROR is generated and the configure step stops executing.  A package-specific list of components may be listed after the REQUIRED option, or after the COMPONENTS option if no REQUIRED option is given.
   </li>
   <li>
@@ -246,7 +246,8 @@
     <p>True if the given name is a command that can be invoked.<br><pre>  IF(EXISTS file-name)<br>  IF(EXISTS directory-name)<br></pre>
     <p>True if the named file or directory exists.  Behavior is well-defined only for full paths.<br><pre>  IF(file1 IS_NEWER_THAN file2)<br></pre>
     <p>True if file1 is newer than file2 or if one of the two files doesn't exist. Behavior is well-defined only for full paths.<br><pre>  IF(IS_DIRECTORY directory-name)<br></pre>
-    <p>True if the given name is a directory.  Behavior is well-defined only for full paths.<br><pre>  IF(variable MATCHES regex)<br>  IF(string MATCHES regex)<br></pre>
+    <p>True if the given name is a directory.  Behavior is well-defined only for full paths.<br><pre>  IF(IS_ABSOLUTE path)<br></pre>
+    <p>True if the given path is an absolute path.<br><pre>   IF(variable MATCHES regex)<br>  IF(string MATCHES regex)<br></pre>
     <p>True if the given string or variable's value matches the given regular expression.<br><pre>  IF(variable LESS number)<br>  IF(string LESS number)<br>  IF(variable GREATER number)<br>  IF(string GREATER number)<br>  IF(variable EQUAL number)<br>  IF(string EQUAL number)<br></pre>
     <p>True if the given string or variable's value is a valid number and the inequality or equality is true.<br><pre>  IF(variable STRLESS string)<br>  IF(string STRLESS string)<br>  IF(variable STRGREATER string)<br>  IF(string STRGREATER string)<br>  IF(variable STREQUAL string)<br>  IF(string STREQUAL string)<br></pre>
     <p>True if the given string or variable's value is lexicographically less (or greater, or equal) than the string on the right.<br><pre>  IF(DEFINED variable)<br></pre>
@@ -275,7 +276,7 @@
   </li>
   <li>
     <b><code>INSTALL</code></b>: Specify rules to run at install time.<br>
-    <p>This command generates installation rules for a project.  Rules specified by calls to this command within a source directory are executed in order during installation.  The order across directories is not defined.<br><p>There are multiple signatures for this command.  Some of them define installation properties for files and targets.  Properties common to multiple signatures are covered here but they are valid only for signatures that specify them.  DESTINATION arguments specify the directory on disk to which a file will be installed.  If a full path (with a leading slash or drive letter) is given it is used directly.  If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX.  PERMISSIONS arguments specify permissions for installed files.  Valid permissions are OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, SETUID, and SETGID.  Permissions that do not make sense on certain platforms are ignored on those platforms.  The CONFIGURATIONS argument specifies a list of build configurations for which the install rule applies (Debug, Release, etc.).  The COMPONENT argument specifies an installation component name with which the install rule is associated, such as "runtime" or "development".  During component-specific installation only install rules associated with the given component name will be executed.  During a full installation all components are installed.  The RENAME argument specifies a name for an installed file that may be different from the original file.  Renaming is allowed only when a single file is installed by the command.  The OPTIONAL argument specifies that it is not an error if the file to be installed does not exist.  <br><p>The TARGETS signature:<br><pre>  INSTALL(TARGETS targets...<br>          [[ARCHIVE|LIBRARY|RUNTIME]<br>                              [DESTINATION &lt;dir&gt;]<br>                              [PERMISSIONS permissions...]<br>                              [CONFIGURATIONS [Debug|Release|...]]<br>                              [COMPONENT &lt;component&gt;]<br>                              [OPTIONAL]<br>                             ] [...])<br></pre>
+    <p>This command generates installation rules for a project.  Rules specified by calls to this command within a source directory are executed in order during installation.  The order across directories is not defined.<br><p>There are multiple signatures for this command.  Some of them define installation properties for files and targets.  Properties common to multiple signatures are covered here but they are valid only for signatures that specify them.<br><p>DESTINATION arguments specify the directory on disk to which a file will be installed.  If a full path (with a leading slash or drive letter) is given it is used directly.  If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX.<br><p>PERMISSIONS arguments specify permissions for installed files.  Valid permissions are OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, SETUID, and SETGID.  Permissions that do not make sense on certain platforms are ignored on those platforms.<br><p>The CONFIGURATIONS argument specifies a list of build configurations for which the install rule applies (Debug, Release, etc.).<br><p>The COMPONENT argument specifies an installation component name with which the install rule is associated, such as "runtime" or "development".  During component-specific installation only install rules associated with the given component name will be executed.  During a full installation all components are installed.<br><p>The RENAME argument specifies a name for an installed file that may be different from the original file.  Renaming is allowed only when a single file is installed by the command.<br><p>The OPTIONAL argument specifies that it is not an error if the file to be installed does not exist.  <br><p>The TARGETS signature:<br><pre>  INSTALL(TARGETS targets...<br>          [[ARCHIVE|LIBRARY|RUNTIME]<br>                              [DESTINATION &lt;dir&gt;]<br>                              [PERMISSIONS permissions...]<br>                              [CONFIGURATIONS [Debug|Release|...]]<br>                              [COMPONENT &lt;component&gt;]<br>                              [OPTIONAL]<br>                             ] [...])<br></pre>
     <p>The TARGETS form specifies rules for installing targets from a project.  There are three kinds of target files that may be installed: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms. The ARCHIVE, LIBRARY, and RUNTIME arguments change the type of target to which the subsequent properties apply.  If none is given the installation properties apply to all target types.  If only one is given then only targets of that type will be installed (which can be used to install just a DLL or just an import library).<br><p>One or more groups of properties may be specified in a single call to the TARGETS form of this command.  A target may be installed more than once to different locations.  Consider hypothetical targets "myExe", "mySharedLib", and "myStaticLib".  The code<br><pre>    INSTALL(TARGETS myExe mySharedLib myStaticLib<br>            RUNTIME DESTINATION bin<br>            LIBRARY DESTINATION lib<br>            ARCHIVE DESTINATION lib/static)<br>    INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)<br></pre>
     <p>will install myExe to &lt;prefix&gt;/bin and myStaticLib to &lt;prefix&gt;/lib/static.  On non-DLL platforms mySharedLib will be installed to &lt;prefix&gt;/lib and /some/full/path.  On DLL platforms the mySharedLib DLL will be installed to &lt;prefix&gt;/bin and /some/full/path and its import library will be installed to &lt;prefix&gt;/lib/static and /some/full/path. On non-DLL platforms mySharedLib will be installed to &lt;prefix&gt;/lib and /some/full/path.<br><p>The FILES signature:<br><pre>  INSTALL(FILES files... DESTINATION &lt;dir&gt;<br>          [PERMISSIONS permissions...]<br>          [CONFIGURATIONS [Debug|Release|...]]<br>          [COMPONENT &lt;component&gt;]<br>          [RENAME &lt;name&gt;] [OPTIONAL])<br></pre>
     <p>The FILES form specifies rules for installing files for a project.  File names given as relative paths are interpreted with respect to the current source directory.  Files installed by this form are by default given permissions OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ if no PERMISSIONS argument is given.<br><p>The PROGRAMS signature:<br><pre>  INSTALL(PROGRAMS files... DESTINATION &lt;dir&gt;<br>          [PERMISSIONS permissions...]<br>          [CONFIGURATIONS [Debug|Release|...]]<br>          [COMPONENT &lt;component&gt;]<br>          [RENAME &lt;name&gt;] [OPTIONAL])<br></pre>
@@ -388,7 +389,7 @@
   <li>
     <b><code>REMOVE_DEFINITIONS</code></b>: Removes -D define flags to the command line of C and C++ compilers.<br>
     <pre>  REMOVE_DEFINITIONS(-DFOO -DBAR ...)<br></pre>
-    <p>Removes flags from command line of C and C++ compilers.  This command can be used to remove any flag from a compile line, but the -D flag is accepted most C/C++ compilers.  Other flags may not be as portable.
+    <p>Removes flags from command line of C and C++ compilers.  This command can be used to remove any flag from a compile line, but the -D flag is accepted by most C/C++ compilers.  Other flags may not be as portable.
   </li>
   <li>
     <b><code>SEPARATE_ARGUMENTS</code></b>: Split space separated arguments into a semi-colon separated list.<br>
@@ -466,8 +467,8 @@
   </li>
   <li>
     <b><code>TRY_RUN</code></b>: Try compiling and then running some code.<br>
-    <pre>  TRY_RUN(RUN_RESULT_VAR COMPILE_RESULT_VAR<br>          bindir srcfile &lt;CMAKE_FLAGS &lt;Flags&gt;&gt;<br>          &lt;COMPILE_DEFINITIONS &lt;flags&gt;&gt;<br>          &lt;OUTPUT_VARIABLE var&gt;<br>          &lt;ARGS &lt;arg1&gt; &lt;arg2&gt;...&gt;)<br></pre>
-    <p>Try compiling a srcfile.  Return the success or failure in COMPILE_RESULT_VAR.  Then if the compile succeeded, run the executable and return the result in RUN_RESULT_VAR. If the executable was built, but failed for to run for some reason, then RUN_RESULT_VAR will be set to FAILED_TO_RUN, and the output will be in the COMPILE_RESULT_VAR. OUTPUT_VARIABLE specifies the name of the variable to put all of the standard output and standard error into.
+    <pre>  TRY_RUN(RUN_RESULT_VAR COMPILE_RESULT_VAR<br>          bindir srcfile [CMAKE_FLAGS &lt;Flags&gt;]<br>          [COMPILE_DEFINITIONS &lt;flags&gt;]<br>          [OUTPUT_VARIABLE var]<br>          [ARGS &lt;arg1&gt; &lt;arg2&gt;...])<br></pre>
+    <p>Try compiling a srcfile.  Return TRUE or FALSE for success or failure in COMPILE_RESULT_VAR.  Then if the compile succeeded, run the executable and return its exit code in RUN_RESULT_VAR. If the executable was built, but failed to run, then RUN_RESULT_VAR will be set to FAILED_TO_RUN. OUTPUT_VARIABLE specifies the name of the variable to put all of the standard output and standard error into.
   </li>
   <li>
     <b><code>USE_MANGLED_MESA</code></b>: Copy mesa headers for use in combination with system GL.<br>



More information about the Cmake-commits mailing list