| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
|
|
|
|
| |
Fixes: #18521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Other check modules honor this variable, so include file checks should
too. Add policy `CMP0075` to enable the behavior in a compatible way.
This change was originally made by commit v3.11.0-rc1~108^2
(CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it
was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor
CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could
affect checks in existing projects in an incompatible way.
Fixes: #9514
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit v3.11.0-rc1~108^2 (CheckIncludeFiles: Honor
CMAKE_REQUIRED_LIBRARIES, 2017-12-24). The behavior change can
affect checks in existing projects that don't expect the behavior.
Introducing the behavior again will require a policy.
Fixes: #17874
Issue: #9514
|
|
|
|
|
|
|
|
| |
This is needed when cross compiling and the compiler requires a specific
linker different from the default, e.g., when cross compiling from
Darwin to Linux and passing `-fuse-ld=lld` to clang.
Fixes: #9514
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Automate with:
find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
|
|
|
|
|
| |
Improve formatting. Link from each module to the other two. Explain
the command signatures in more detail.
|
|
|
|
| |
Otherwise callers may expect to be able to re-use result variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cleanup in commit 4f2fcce4 (Check*: Allow result variables to
contain regex special characters, 2014-07-31) broke old VXL code that
abuses the old "if(MATCHES)" implementation by using
SET( ${VARIABLE} ${VARIABLE} )
to reset a check result variable. Add a compatibility hack to the
CheckFunctionExists, CheckIncludeFileCXX, and CheckSymbolExists modules
to re-run their checks when the result variable is set to its own name.
Use STREQUAL instead of MATCHES so that special characters still work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to the existence of the if(DEFINED) condition, many of our Check
modules implemented the condition with a hack that takes advantage of
the auto-dereference behavior of the if() command to detect if a
variable is defined. The hack has the form:
if("${VAR} MATCHES "^${VAR}$")
where "${VAR}" is a macro argument reference. However, this does not
work when the variable named in the macro argument contains characters
that have special meaning in regular expressions, such as '+'. Run the
command
git grep -E 'if\("\$\{.*\}" MATCHES "\^\$\{.*\}\$"\)' -- Modules/Check*
to identify lines with this problem. Use if(NOT DEFINED) instead.
|
|
|
|
|
| |
Setting this flag can silence messages from the Check*.cmake modules.
This can be used by Find*.cmake modules when they are in silent mode.
|
|
|
|
|
|
| |
Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08)
we no longer need to use the configure_file IMMEDIATE option to support
compatibility modes less than 2.0.
|
|
|
|
|
|
|
|
| |
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace. Wipe out all remnants of trailing whitespace
everywhere except third-party code.
Run the following shell code:
git ls-files -z -- \
bootstrap doxygen.config '*.readme' \
'*.c' '*.cmake' '*.cpp' '*.cxx' \
'*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
'*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
CMAKE_REQUIRED_DEFINITIONS option.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
is added to the cxx flags
|
|
|
|
| |
Close Bug #136 - Verify that all modules that do try compile produce CMakeError.log and CMakeOutput.log
|
| |
|
|
|
|
| |
MAKE_DIRECTORY with FILE(MAKE_DIRECTORY, replace STRING(ASCII things
|
| |
|
|
|
|
| |
projects within projects to have different languages
|
| |
|
| |
|
| |
|
| |
|
|
|