summaryrefslogtreecommitdiffstats
path: root/Help/command/if.rst
Commit message (Collapse)AuthorAgeFilesLines
* CMakeDependentOption: Document that 4th parameter follows if-syntaxHong Xu2019-08-051-0/+2
|
* Merge topic 'if-EXISTS-doc'Brad King2019-04-041-1/+3
|\ | | | | | | | | | | | | 78ac8cb04a Help: clarify if(EXISTS) operation for symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3189
| * Help: clarify if(EXISTS) operation for symlinksShoaib Meenai2019-04-041-1/+3
| | | | | | | | if(EXISTS) resolves symlinks; note this explicitly in its documentation.
* | Help: Improve documentation formatingBartosz Kosiorek2019-04-041-1/+1
|/
* Help: Fix elseif/endif typoJuuso "Linda" Lapinlampi2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In CMake 3.13.x, we had this evaluation for if() conditions: if(a) elseif(b) else(a) endif(a) The sensible intention of the change in commit c2efb3efcd (Help: Revise docs on Scripting Commands, 2018-10-16, v3.14.0-rc1~505^2) was: > "endif", "endfunction" etc: Explain that the argument is optional and > maintained for compatibility only Instead of "endif", it ended up being written to the documentation as "elseif" by the commit author (oops) to if()'s page. if(a) elseif(a!?) else() endif(a?) Truthfully, endif()'s parameter should be an optional verbatim repeat and not elseif()'s. If it wasn't, elseif() would be described to be the same as if(). The rightful intended description is: if(a) elseif(b) else() endif() Fix that typo.
* If: Support the 'DEFINED CACHE{}' syntaxRobert Maynard2018-11-091-5/+4
|
* Help: Document if(DEFINED ENV{name})Joachim Wuttke (h)2018-11-081-7/+9
|
* Help: short/long variable reference in if commandJoachim Wuttke (l)2018-11-081-1/+5
| | | | | Explain that the short form of variable references in the if command does not apply to ENV and CACHE vars.
* Help: Revise docs on Scripting CommandsJoachim Wuttke (l)2018-10-231-8/+17
| | | | | | | | | | | | | | | | | | | Revise docs for all "Scripting Commands", except four find_XXX that use a macro suite of their own. * Take full advantage of the improved syntax highlighting. * Make consequential use of <..> placeholders. * Clarify things here and there in the text. Specific improvements to some command docs: * "math": Correct description of novel hexadecimal capability. * "if", "foreach", "while": Provide link to "endif" etc * "foreach", "while": Mention "break" and "continue". * "foreach": Simplify explanation of ``RANGE`` and ``IN`` signatures; advise against negative arguments or reverse ranges (compare issue #18461) * "endif", "endfunction" etc: Explain that the argument is optional and maintained for compatibility only
* Help: Make synopsis of if command more compact; add section headersJoachim Wuttke (l)2018-10-091-41/+49
| | | | | | Also replace 'expression' by 'condition' (as in the while command); relegate optional arguments of else() and endif() to the text; revise explanation of operator precedence in Condition Syntax section.
* Help: Clarify handling of non-integer components in if() version testsCraig Scott2018-09-171-5/+15
|
* Help: Fix formatting typo for the 'if' commandSylvain Joubert2017-08-181-1/+1
|
* Help: Document CMAKE_MATCH_<n> variablesBrad King2017-04-181-0/+1
|
* Help: Link from if(MATCHES) to regex specification docsBrad King2017-04-181-1/+1
|
* Help: Fix cmake code block warnings produced by Sphinx 1.4Brad King2017-02-101-3/+3
| | | | | | | Some of our "cmake" code blocks do not use fully valid CMake syntax because they have placeholders for human reference. Sphinx has never been able to properly lex and highlight these, but now warns. Fix each block's syntax or change to a non-cmake block as appropriate.
* Add additional <= and >= comparison operatorsChuck Atkins2016-08-091-16/+43
| | | | | This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION equivalents to use the combined <= and >= functionality.
* Help: Clarify scope of `if(TARGET)` expressionBartosz Kosiorek2016-01-281-3/+4
|
* Help: Improve markup in `if` command documentationBartosz Kosiorek2016-01-281-1/+1
|
* if: Add "TEST <test>" conditionMatt McCormick2015-08-031-0/+4
| | | | | | | | if(TEST TestNameThatExists) will return true if a test with the name TestNameThatExists has been added with add_test. The syntax is similar to if(TARGET TargetName). Since use of "TEST" as an argument to if() could previously be interpreted as a non-keyword argument, add policy CMP0064 to treat it as a keyword as NEW behavior.
* if: Implement new IN_LIST operatorNils Gladitz2015-04-301-0/+3
|
* Help: Clarify if(<variable>) documentation (#15335)Brad King2015-01-081-4/+5
| | | | | When the variable is not defined the signature is actually accepting a string. Also clarify fall-through from if(<constant>) case.
* If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-0/+6
|
* Help: Fix typo in 'if()' command documentationRaphael Kubo da Costa2014-01-151-1/+1
| | | | s/argumemnts/arguments/
* Help: Clarify if(TARGET) behavior (#14646)Brad King2013-12-181-1/+3
| | | | | Define the meaning of a "target" clearly and link to the commands that create them.
* Help: Format 'if' command documentationBrad King2013-12-181-207/+167
| | | | | | | Manually update reStructuredText formatting. Use a definition list for the possible if() tests supported. Add inline literal markup as appropriate. Also make minor wording tweaks to make it flow better with the new markup.
* Help: Document macro argument caveats in more detailDaniele E. Domenichelli2013-11-191-1/+2
| | | | | | Add notes about macro arguments in the foreach, if, and list commands. Add a section to the macro command documentation explaining in detail how macro arguments are not variables.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-0/+238
Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.