Commit Graph

17 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Peter Kokot
70ccf47e60
Help: Add more examples for condition syntax in commands
Issue: #26487
2024-12-06 03:09:46 +01:00
Vicente Adolfo Bolea Sanchez
df377a22dd CMakeDependentOption: allow in depends the use of . 2022-09-21 13:19:45 -04:00
Ben Boeckel
7a614977f9 CMakeDependentOption: improve documentation
This makes it far clearer that `<depends>` is a list up front instead of
burying the lede because a list is generally "trivially true" in CMake[1].
Also clarify that `<force>` is only available as a local variable and if
queried outside of the "scope" of the `cmake_dependent_option` call,
will get the stored user cache value.

[1] The exception being when the last entry ends in `-NOTFOUND`.

Suggested-by: Rui Oliveira
2022-03-30 16:05:37 -04:00
Daniel Schürmann
059b90a0b4 CMakeDependentOption: Introduce policy CMP0127 for full Condition Syntax
Fixes: #22303
2021-09-10 09:46:55 -04:00
Brad King
d777ca12f6 CMakeDependentOption: Revert "Allow parentheses in the depends string"
Revert commit 0665d9092e (CMakeDependentOption: Allow parentheses in the
depends string, 2021-06-13, v3.21.0-rc1~32^2).  It broke existing use
cases with parentheses in regular expressions.  Also add a test for this.

Fixes: #22447
2021-07-20 12:18:53 -04:00
Daniel Schürmann
0665d9092e CMakeDependentOption: Allow parentheses in the depends string
`if()` takes the condition as a list of arguments.
Parentheses need to be separated as well.

Fixes: #22303
2021-06-14 13:45:49 -04:00
Betsy McPhail
91f791b498 CMakeDependentOption: Expand documentation 2020-08-18 13:33:06 -04:00
Hong Xu
d192caefff CMakeDependentOption: Document that 4th parameter follows if-syntax 2019-08-05 10:15:21 -04:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Kitware Robot
9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot
77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Todd Gamblin
2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King
3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
Brad King
de007ef199 ENH: Adding CMAKE_DEPENDENT_OPTION macro. 2006-10-19 14:48:12 -04:00