Commit Graph

8 Commits

Author SHA1 Message Date
Brad King 3b5ea54a27 CheckPrototypeDefinition: Avoid if() auto-dereference
Convert from the old if(MATCHES) hack to if(DEFINED) to check whether
the result variable is already set.
2014-09-16 09:04:20 -04:00
Sebastian Leske 908c74399a Help: Document that the CHECK_* macros create cache variables
Otherwise callers may expect to be able to re-use result variables.
2014-09-11 08:55:26 -04:00
Clinton Stimpson 4c0cc9ab91 Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.
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.
2014-03-29 20:14:23 -06: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
Stephen Kelly 236133e79e Handle targets in the LINK_LIBRARIES of try_compile.
Imported targets are re-exported so that they can be used by the
try_compile generated code with target_link_libraries.

This makes the use of the cmake_expand_imported_targets macro
obsolete. The macro is not able to expand the generator expressions
which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content.
Instead it just sees them as 'not a target'.
2013-02-22 08:35:39 -05: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
Alex Neundorf 35c48e1270 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
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
2012-02-21 15:38:15 -05:00
Andreas Schneider 4f252abea5 Modules: Added CheckPrototypeDefinition module.
This check if the function exists and the prototype we want to use is
correct. There are still functions which have different prototypes on
different UNIX systems.
2011-03-18 14:03:35 -04:00