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
Add the function cmake_expand_imported_targets() to expand imported
targets in a list of libraries into their on-disk file names for a
particular configuration. Adapt the implementation from KDE's
HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES which has been in
use for over 2 years. Call the function from all the Check*.cmake
macros to handle imported targets named in CMAKE_REQUIRED_LIBRARIES.
Alex
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.
This teaches the CHECK_C_SOURCE_COMPILES and CHECK_CXX_SOURCE_COMPILES
macros to recognize a FAIL_REGEX option. If they see the regular
expression in the output of the test compilation, the check fails.
This commit improves formatting and style of the documentation for the
general-purpose compiler check macros:
CHECK_C_COMPILER_FLAG
CHECK_C_SOURCE_COMPILES
CHECK_C_SOURCE_RUNS
CHECK_CXX_COMPILER_FLAG
CHECK_CXX_SOURCE_COMPILES
CHECK_CXX_SOURCE_RUNS
This sytle is more consistent with CMake command documentation.
It also looks nicer in the generated documentation text files.