This solves a lots of warnings, e.g. in the FindModulesExecuteAll test. If the
installed version on the system is rather old this may even lead to bugs, e.g.
https://bugs.gentoo.org/show_bug.cgi?id=436540
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.
Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
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
This teaches the FindVTK module to use the Config mode of find_package()
to search for VTKConfig in the common case. The old search method based
on find_path() and UseVTK is now used only to search for VTK 4.0.
This approach avoids the need to update the module for each new VTK
version because find_package(VTK) automatically searches "lib/vtk*". It
also addresses issue #9105 since find_package searches lib64 paths too.
This adds copyright/license notification blocks CMake's find-modules.
Many 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.