[cmake-commits] king committed CMakeCommands.html 1.44 1.45

cmake-commits at cmake.org cmake-commits at cmake.org
Tue May 29 06:00:12 EDT 2007


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

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


Index: CMakeCommands.html
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/CMakeCommands.html,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- CMakeCommands.html	18 May 2007 10:00:08 -0000	1.44
+++ CMakeCommands.html	29 May 2007 10:00:08 -0000	1.45
@@ -1,4 +1,4 @@
-<h2>Documentation for Commands of CMake 2.4-patch 7 RC-6</h2>
+<h2>Documentation for Commands of CMake 2.4-patch 7 RC-7</h2>
 <ul>
   <li>
     <b><code>ADD_CUSTOM_COMMAND</code></b>: Add a custom build rule to the generated build system.<br>
@@ -316,7 +316,7 @@
   <li>
     <b><code>LIST</code></b>: List operations.<br>
     <pre>  LIST(LENGTH &lt;list&gt; &lt;output variable&gt;)<br>  LIST(GET &lt;list&gt; &lt;element index&gt; [&lt;element index&gt; ...] &lt;output variable&gt;)<br>  LIST(APPEND &lt;list&gt; &lt;element&gt; [&lt;element&gt; ...])<br>  LIST(INSERT &lt;list&gt; &lt;element_index&gt; &lt;element&gt; [&lt;element&gt; ...])<br>  LIST(REMOVE_ITEM &lt;list&gt; &lt;value&gt; [&lt;value&gt; ...])<br>  LIST(REMOVE_AT &lt;list&gt; &lt;index&gt; [&lt;index&gt; ...])<br>  LIST(SORT &lt;list&gt;)<br>  LIST(REVERSE &lt;list&gt;)<br></pre>
-    <p>LENGTH will return a given list's length.<br><p>GET will return list of elements specified by indices from the list.<br><p>APPEND will append elements to the list.<br><p>INSERT will insert elements to the list to the specified location.<br><p>When specifying an index, negative value corresponds to index from the end of the list.<br><p>REMOVE_AT and REMOVE_ITEM will remove item from the list. The difference is that REMOVE_ITEM will remove the given items, while REMOVE_AT will remove the item at the given indices.<br>
+    <p>LENGTH will return a given list's length.<br><p>GET will return list of elements specified by indices from the list.<br><p>APPEND will append elements to the list.<br><p>INSERT will insert elements to the list to the specified location.<br><p>When specifying an index, negative value corresponds to index from the end of the list.<br><p>REMOVE_AT and REMOVE_ITEM will remove items from the list. The difference is that REMOVE_ITEM will remove the given items, while REMOVE_AT will remove the items at the given indices.<br>
   </li>
   <li>
     <b><code>LOAD_CACHE</code></b>: Load in the values from another project's CMake cache.<br>
@@ -460,9 +460,9 @@
   <li>
     <b><code>TRY_COMPILE</code></b>: Try compiling some code.<br>
     <pre>  TRY_COMPILE(RESULT_VAR bindir srcdir<br>              projectName &lt;targetname&gt; &lt;CMAKE_FLAGS &lt;Flags&gt;&gt;<br>              &lt;OUTPUT_VARIABLE var&gt;)<br></pre>
-    <p>Try compiling a program.  Return the success or failure in RESULT_VAR. If &lt;target name&gt; is specified then build just that target otherwise the all or ALL_BUILD target is built.<br><pre>  TRY_COMPILE(RESULT_VAR bindir srcfile<br>              &lt;CMAKE_FLAGS &lt;Flags&gt;&gt;<br>              &lt;COMPILE_DEFINITIONS &lt;flags&gt; ...&gt;<br>              &lt;OUTPUT_VARIABLE var&gt;)<br></pre>
-    <p>Try compiling a srcfile.  Return the success or failure in RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags to cmake.  Some extra flags that can be included are,  INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES.  COMPILE_DEFINITIONS are -Ddefinition that will be passed to the compile line. If srcfile is specified the files in bindir/CMakeFiles/CMakeTmp are cleaned automatically. If OUTPUT_VARIABLE is specified, then the output from the build process is stored in the given variable. TRY_COMPILE creates a CMakeList.txt file on the fly, and in that file it looks like this:<br><pre>  ADD_DEFINITIONS( &lt;expanded COMPILE_DEFINITIONS from calling cmake&gt;)<br>  INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})<br>  LINK_DIRECTORIES(${LINK_DIRECTORIES})<br>  ADD_EXECUTABLE(cmTryCompileExec sources)<br>  TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})<br></pre>
-    
+    <p>Try compiling a program.  In this form, srcdir should contain a complete CMake project with a CMakeLists.txt file and all sources. The bindir and srcdir will not be deleted after this command is run. If &lt;target name&gt; is specified then build just that target otherwise the all or ALL_BUILD target is built.<br><pre>  TRY_COMPILE(RESULT_VAR bindir srcfile<br>              &lt;CMAKE_FLAGS &lt;Flags&gt;&gt;<br>              &lt;COMPILE_DEFINITIONS &lt;flags&gt; ...&gt;<br>              &lt;OUTPUT_VARIABLE var&gt;)<br></pre>
+    <p>Try compiling a srcfile.  In this case, the user need only supply a source file.  CMake will create the appropriate CMakeLists.txt file to build the source. In this version all files in bindir/CMakeFiles/CMakeTmp, will be cleaned automatically, for debugging a --debug-trycompile can be passed to cmake to avoid the clean. Some extra flags that  can be included are,  INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES.  COMPILE_DEFINITIONS are -Ddefinition that will be passed to the compile line.  TRY_COMPILE creates a CMakeList.txt file on the fly that looks like this:<br><pre>  ADD_DEFINITIONS( &lt;expanded COMPILE_DEFINITIONS from calling cmake&gt;)<br>  INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})<br>  LINK_DIRECTORIES(${LINK_DIRECTORIES})<br>  ADD_EXECUTABLE(cmTryCompileExec sources)<br>  TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})<br></pre>
+    <p>In both versions of the command, if OUTPUT_VARIABLE is specified, then the output from the build process is stored in the given variable. Return the success or failure in RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags to the cmake that is run during the build. 
   </li>
   <li>
     <b><code>TRY_RUN</code></b>: Try compiling and then running some code.<br>



More information about the Cmake-commits mailing list