[Cmake-commits] [cmake-commits] hoffman committed kitware.css 1.3 1.4 syntax.html 1.4 1.5
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 12 15:37:42 EDT 2008
Update of /cvsroot/CMake/CMakeWeb/HTML
In directory public:/mounts/ram/cvs-serv18706
Modified Files:
kitware.css syntax.html
Log Message:
ENH: fix up syntax page
Index: kitware.css
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/kitware.css,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** kitware.css 10 Mar 2008 17:27:24 -0000 1.3
--- kitware.css 12 Mar 2008 19:37:39 -0000 1.4
***************
*** 170,174 ****
div#ContentTxtProd {
font-family: Verdana, Arial, Helvetica, sans-serif;
! /*font-size: 11px;*/
font-size: 0.6em;
width: 360px;
--- 170,174 ----
div#ContentTxtProd {
font-family: Verdana, Arial, Helvetica, sans-serif;
! /*font-size: 11px;*/
font-size: 0.6em;
width: 360px;
***************
*** 184,192 ****
div#ContentTxtProdWide {
font-family: Verdana, Arial, Helvetica, sans-serif;
! font-size: 0.6em;
width: 600px;
float: left;
margin: 0;
! line-height: 2em;
text-align: justify;
position: relative;
--- 184,193 ----
div#ContentTxtProdWide {
font-family: Verdana, Arial, Helvetica, sans-serif;
! font-size: 0.8em;
! /* font-size: 11px; */
width: 600px;
float: left;
margin: 0;
! line-height: 1.8em;
text-align: justify;
position: relative;
***************
*** 199,202 ****
--- 200,207 ----
font-size: 18px;
}
+ div#ContentTxtProdWide pre {
+ line-height: 1.2em;
+ background-color: #EEEEEE;
+ }
div#ContentNews {
font-family: Arial, Helvetica, sans-serif;
Index: syntax.html
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/syntax.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** syntax.html 12 Mar 2008 14:04:46 -0000 1.4
--- syntax.html 12 Mar 2008 19:37:40 -0000 1.5
***************
*** 21,24 ****
--- 21,25 ----
<META NAME="rating" CONTENT="General">
<META NAME="ROBOTS" CONTENT="ALL">
+
<script language="JavaScript">
function SubmitSearch()
***************
*** 29,32 ****
--- 30,34 ----
}
</script>
+
</head>
<body>
***************
*** 49,53 ****
<li><a href="copyright.html">Copyright</a></li>
<li><a href="participants.html">Participants</a></li>
! <li><a href="news.html">News</a></li>
<li><a href="http://www.cdash.org">CDash</a></li>
<li><a href="http://www.kitware.com">Kitware</a></li>
--- 51,55 ----
<li><a href="copyright.html">Copyright</a></li>
<li><a href="participants.html">Participants</a></li>
! <li><a href="News.html">News</a></li>
<li><a href="http://www.cdash.org">CDash</a></li>
<li><a href="http://www.kitware.com">Kitware</a></li>
***************
*** 69,73 ****
<li><a href="MailingLists.html">Mailing list</a></li>
<li><a href="http://www.cmake.org/Wiki/CMake">Wiki</a></li>
! <li><a href="testing.html">Testing Setup</a></li>
</ul>
</li>
--- 71,75 ----
<li><a href="MailingLists.html">Mailing list</a></li>
<li><a href="http://www.cmake.org/Wiki/CMake">Wiki</a></li>
! <li><a href="Testing.html">Testing Setup</a></li>
</ul>
</li>
***************
*** 82,174 ****
<div id="Content">
<div id="ContentTxtProdWide"><div id="documentation_header"></div><br />
!
!
! </div>
!
! <p><br class="clear" />
! </p>
! <h2>Syntax Introduction</h2>
! <p>CMakeLists.txt files follow a simple syntax consisting of comments, commands, and white
! space. A comment is indicated using the # character and runs from that character until the end
! of the line. A command consists of the command name, opening parenthesis, white space
! separated arguments and a closing parenthesis. A command can be either one of the built in
! commands like add_library, or a user defined macro or function. The input to CMake is a CMakeLists.txt file in the source directory. That file in turn can use the include or the add_subdirectory command to add additional input files. </p>
! <p> All white space (spaces, line feeds, tabs) are
! ignored except to separate arguments. Anything within a set of double quotes is treated as one
! argument as is typical for most languages. The backslash can be used to escape characters
! preventing the normal interpretation of them. </p>
! <p> Each command is evaluated in the order that it appears in the CMakeLists file. The commands
! have the form <br />
! <pre> command (args...)</pre></p>
! <p> where command is the name of the command, macro or function, and args is a white-space separated list of
! arguments. (Arguments with embedded white-space should be double quoted.) CMake is case
! insensitive to command names. So where you see command you could use
! COMMAND or Command instead. </p>
! <h2>Lists and Strings</h2>
! The basic data type in CMake is a string. CMake also supports lists of strings. A list can be created with semi-colons as separators. For example these two statements set the same value in to variable VAR:
! <pre>
! set(VAR a;b;c)
! set(VAR a b c)
! </pre>
! <p>Lists of strings can be iterated with the foreach command or manipulated with the list command.</p>
! <h2>Variables</h2>
! <p>CMake supports simple variables that can be either strings or lists of strings. Variables are
! referenced using a ${VAR} syntax. Multiple arguments can be grouped together into a list
! using the set command. All other commands expand the lists as if they had been passed into
! the command with white-space separation. For example,
! <pre> set(Foo a b c)</pre>
! will result in setting the variable Foo to a b c, and if Foo is passed into another command
! <pre> command(${Foo})</pre> it would be equivalent to <pre> command(a b c)</pre> If you want to pass a list of
! arguments to a command as if it were a single argument simply double quote it. For example
! <pre> command("${Foo}")</pre> would be invoked passing only one argument equivalent to command(
! "a b c" ). </p>
! <h2>Flow Control</h2>
! In many ways writing a CMakeLists file is like a writing a program in a simple language.
! Like most languages CMake provides flow control structures to help you along your way.
! CMake provides three flow control structures:
! <ul>
! <li>conditional statements: if</li>
! <pre>
! # some_command will be called if the variable's value is not:
! # empty, 0, N, NO, OFF, FALSE, NOTFOUND, or <variable>-NOTFOUND.
! if(var)
! some_command(...)
! endif(var)
</pre>
! <li>looping constructs: foreach and whilie</li>
! <pre>
! set(VAR a b c)
! # loop over a, b,c with the variable f
! foreach(f ${VAR})
! message(${f})
! endforeach(f)
</pre>
! <li>procedure definitions: macro and function (function available in 2.6 and greater). functions create a local scope for variables, and macros use the global scope.</li>
! <pre>
! # define a macro hello
macro(hello MESSAGE)
! message(${MESSAGE})
! endmacro(hello)
! # call the macro with the string "hello world"
! hello("hello world")
!
!
! # define a function hello
function(hello MESSAGE)
! message(${MESSAGE})
! endfunction(hello)
! </pre>
</ul>
! For more information on flow control see the documetation for the commands if, while, foreach, macro, and function.
! <h2>Quotes, Strings and Escapes</h2>
! A string literal in CMake is created with by enclosing it in double quotes. Strings can be multi-line strings and will have embeded newlines in them. For example:
! <pre>
! set(MY_STRING "this is a string with a
newline in
it")
! </pre>
! You can also escape characters or use variables in a string.
! <pre>
! set(VAR "
hello
world
--- 84,171 ----
<div id="Content">
<div id="ContentTxtProdWide"><div id="documentation_header"></div><br />
! <h2>Syntax Introduction</h2>
! <ul style="list-style-type: none;">
! <li>
! <p>CMakeLists.txt files follow a simple syntax consisting of comments, commands, and white space. A comment is indicated using the # character and runs from that character until the end of the line. A command consists of the command name, opening parenthesis, white space separated arguments and a closing parenthesis. A command can be either one of the built in commands like add_library, or a user defined macro or function. The input to CMake is a CMakeLists.txt file in the source directory. That file in turn can use the include or the add_subdirectory command to add additional input files. </p>
! <p> All white space (spaces, line feeds, tabs) are ignored except to separate arguments. Anything within a set of double quotes is treated as one argument as is typical for most languages. The backslash can be used to escape characters preventing the normal interpretation of them. </p>
! <p> Each command is evaluated in the order that it appears in the CMakeLists file. The commands have the form <br />
! </p>
! <pre> command (args...)</pre>
! <p> where command is the name of the command, macro or function, and args is a white-space separated list of arguments. (Arguments with embedded white-space should be double quoted.) CMake is case insensitive to command names. So where you see command you could use COMMAND or Command instead.</p>
! </li>
! </ul>
! <h2>Lists and Strings</h2>
! <blockquote>
! <p>The basic data type in CMake is a string. CMake also supports lists of strings. A list can be created with semi-colons as separators. For example these two statements set the same value in to variable VAR: </p>
! <pre> set(VAR a;b;c) set(VAR a b c) </pre>
! <p>Lists of strings can be iterated with the foreach command or manipulated with the list command.</p>
! </blockquote>
! <h2>Variables</h2>
! <blockquote>
! <p>CMake supports simple variables that can be either strings or lists of strings. Variables are referenced using a ${VAR} syntax. Multiple arguments can be grouped together into a list using the set command. All other commands expand the lists as if they had been passed into the command with white-space separation. For example, </p>
! <pre> set(Foo a b c)</pre>
! <p>will result in setting the variable Foo to a b c, and if Foo is passed into another command </p>
! <pre> command(${Foo})</pre>
! <p>it would be equivalent to </p>
! <pre> command(a b c)</pre>
! <p>If you want to pass a list of arguments to a command as if it were a single argument simply double quote it. For example </p>
! <pre> command("${Foo}")</pre>
! <p>would be invoked passing only one argument equivalent to command( "a b c" ). </p>
! </blockquote>
! <h2>Flow Control</h2>
! <blockquote>
! <p>In many ways writing a CMakeLists file is like a writing a program in a simple language. Like most languages CMake provides flow control structures to help you along your way. CMake provides three flow control structures: </p>
! </blockquote>
! <ul style="list-style-type: none;">
! <ul>
! <li>conditional statements: if</li>
! <pre>
! # some_command will be called if the variable's value is not:
! # empty, 0, N, NO, OFF, FALSE, NOTFOUND, or -NOTFOUND.
! if(var)
! some_command(...)
! endif(var)
</pre>
! <li>looping constructs: foreach and while</li>
! <pre>set(VAR a b c)
! # loop over a, b,c with the variable f
! foreach(f ${VAR})
! message(${f})
! endforeach(f)
</pre>
! <li>procedure definitions: macro and function (function available in 2.6 and greater). functions create a local scope for variables, and macros use the global scope.</li>
! <pre>
! # define a macro hello
macro(hello MESSAGE)
! message(${MESSAGE})
! endmacro(hello)
! # call the macro with the string "hello world"
! hello("hello world")
! # define a function hello
function(hello MESSAGE)
! message(${MESSAGE})
! endfunction(hello) </pre>
! </ul>
</ul>
! <blockquote>
! <p>For more information on flow control see the documetation for the commands if, while, foreach, macro, and function. </p>
! </blockquote>
! <h2>Quotes, Strings and Escapes</h2>
! <blockquote>
! <p>A string literal in CMake is created with by enclosing it in double quotes. Strings can be multi-line strings and will have embeded newlines in them. For example: </p>
! </blockquote>
! <blockquote>
! <pre>
! set(MY_STRING "this is a string with a
newline in
it")
! </pre>
! </blockquote>
! <blockquote>
! <p>You can also escape characters or use variables in a string. </p>
! </blockquote>
! <blockquote>
! <pre>
! set(VAR "
hello
world
***************
*** 179,200 ****
hello
world
! </pre>
! Standard C like escapes are also supported.
! <pre>
! message("\n\thello world")
! # prints out
!
! hello world
! </pre>
! A string literal is only a string literal if the charactor preceding the quote is white space.
! For example:
! <pre>
! message(hell"o") -> prints hell"o"
! message(hell"o") -> prints hell"o"
! message(hell\"o\") -> prints hell"o"
! </pre>
! However, quotes must still be balanced, as this is an error:
! <pre>
! message(hell"o) -> produces this error:
Parse error. Function missing ending ")".
Instead found unterminated string with text "o)
--- 176,205 ----
hello
world
! </pre>
! </blockquote>
! <blockquote>
! <p>Standard C like escapes are also supported. </p>
! </blockquote>
! <blockquote>
! <pre>
! message("\n\thello world")
! # prints out
! hello world </pre>
! </blockquote>
! <blockquote>
! <p>A string literal is only a string literal if the charactor preceding the quote is white space. For example: </p>
! </blockquote>
! <blockquote>
! <pre>
! message(hell"o") -> prints hell"o"
! message(hell"o") -> prints hell"o"
! message(hell\"o\") -> prints hell"o"
! </pre>
! </blockquote>
! <blockquote>
! <p>However, quotes must still be balanced, as this is an error: </p>
!
! <pre>
! message(hell"o) -> produces this error:
Parse error. Function missing ending ")".
Instead found unterminated string with text "o)
***************
*** 202,235 ****
message(hell\"o) -> prints hell"o
! </pre>
!
!
! <h2>Regular Expressions</h2>
! A few CMake commands, such as if and string, make use of regular expressions or can
! take a regular expression as an argument. In its simplest form, a regular-expression is a
! sequence of characters used to search for exact character matches. However, many times the
! exact sequence to be found is not known, or only a match at the beginning or end of a string is
! desired. Since there are a few different conventions for specifying regular expressions,
! CMake’s standard is described below. The description is based on the open source regular
! expression class from Texas Instruments that is used by CMake for parsing regular
! expressions.
! <p> Regular expressions can be specified by using combinations of standard alphanumeric
! characters and the following regular expression meta-characters: </p>
! <ul>
! <li>^ Matches at beginning of a line or string</li>
! <li>$ Matches at end of a line or string</li>
! <li>. Matches any single character other than a newline</li>
! <li>[ ] Matches any character(s) inside the brackets</li>
! <li>[^ ] Matches any character(s) not inside the brackets</li>
! <li>[-] Matches any character in range on either side of a dash</li>
! <li>* Matches preceding pattern zero or more times</li>
! <li>+ Matches preceding pattern one or more times</li>
! <li>? Matches preceding pattern zero or once only</li>
! <li>() Saves a matched expression and uses it in a later replacement</li>
! </ul>
! <p> </p>
! This page was inspired by the <a href="http://www.kitware.com/products/cmakebook.html">Mastering CMake</a> book, and from Kernigh's personal wiki describing the scripting language of CMake:
! <a href="http://kernigh.pbwiki.com/CMake">Kernigh's wiki</a>
</div>
</div>
<div id="footer"><br />©2008 Copyright Kitware, Inc.</div>
--- 207,245 ----
message(hell\"o) -> prints hell"o
! </pre>
! </blockquote>
! <h2>Regular Expressions</h2>
! <blockquote>
! <p>A few CMake commands, such as if and string, make use of regular expressions or can take a regular expression as an argument. In its simplest form, a regular-expression is a sequence of characters used to search for exact character matches. However, many times the exact sequence to be found is not known, or only a match at the beginning or end of a string is desired. Since there are a few different conventions for specifying regular expressions, CMake’s standard is described below. The description is based on the open source regular expression class from Texas Instruments that is used by CMake for parsing regular expressions. </p>
! </blockquote>
! <blockquote>
! <p> Regular expressions can be specified by using combinations of standard alphanumeric characters and the following regular expression meta-characters: </p>
! </blockquote>
! <ul style="list-style-type: none;">
! <ul>
! <li>^ Matches at beginning of a line or string</li>
! <li>$ Matches at end of a line or string</li>
! <li>. Matches any single character other than a newline</li>
! <li>[ ] Matches any character(s) inside the brackets</li>
! <li>[^ ] Matches any character(s) not inside the brackets</li>
! <li>[-] Matches any character in range on either side of a dash</li>
! <li>* Matches preceding pattern zero or more times</li>
! <li>+ Matches preceding pattern one or more times</li>
! <li>? Matches preceding pattern zero or once only</li>
! <li>() Saves a matched expression and uses it in a later replacement</li>
! </ul>
! </ul>
! <blockquote>
! <p> </p>
! </blockquote>
! <blockquote>
! <p>This page was inspired by the <a href="http://www.kitware.com/products/cmakebook.html">Mastering CMake</a> book, and from Kernigh's personal wiki describing the scripting language of CMake: <a href="http://kernigh.pbwiki.com/CMake">Kernigh's wiki</a><br>
! </p>
! </blockquote>
</div>
+
+ <br class="clear" />
+ <br />
+ </div>
</div>
<div id="footer"><br />©2008 Copyright Kitware, Inc.</div>
More information about the Cmake-commits
mailing list