summaryrefslogtreecommitdiffstats
path: root/Modules/CheckFunctionExists.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Check* functions family: add support for LINK_OPTIONSMarc Chevrier2018-12-011-10/+23
| | | | Fixes: #18521
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-41/+42
|
* Help: Revise docs of modules AddFileDependencies..CheckFunctionExistsJoachim Wuttke (l)2018-10-181-10/+15
| | | | | | * Replace '::' by '.. code-block:: cmake' wherever it makes sense. * Convert to definition list where appropriate. * Prefer '<placeholder>' over 'placeholder'.
* Check*: Added include guardsCristian Adam2017-12-011-0/+2
|
* CheckFunctionExists: Document suggestion to use CheckSymbolExists instead.Stephen Sorley2017-01-121-9/+21
| | | | | CheckFunctionExists has some severe limitations that are overcome by CheckSymbolExists. Document them and suggest the alternative.
* Simplify CMake per-source license noticesBrad King2016-09-271-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Check(Function|Library|Symbol)Exists: make it work if only C++ is enabledRolf Eike Beer2015-09-251-1/+13
|
* Help: Document that the CHECK_* macros create cache variablesSebastian Leske2014-09-111-0/+1
| | | | Otherwise callers may expect to be able to re-use result variables.
* Check*: Add compatibility hack for old VXL codeBrad King2014-08-181-1/+1
| | | | | | | | | | | | | 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.
* Check*: Allow result variables to contain regex special characters (#14923)Brad King2014-07-311-1/+1
| | | | | | | | | | | | | | | | | | 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.
* Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.Clinton Stimpson2014-03-301-3/+10
| | | | | 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.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-9/+16
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* Fix spelling and typos (non-binary)Andreas Mohr2013-05-071-1/+1
|
* Handle targets in the LINK_LIBRARIES of try_compile.Stephen Kelly2013-02-221-5/+2
| | | | | | | | | | 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'.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-8/+8
| | | | | | | | | | | | | | | | | 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
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-27/+27
| | | | | | | | | | | | | | | | | 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
* Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIESAlex Neundorf2012-02-211-1/+6
| | | | | | | | | | | 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
* -remove trailing whitespaceAlex Neundorf2012-02-211-3/+3
| | | | Alex
* Document CheckFunctionExists more clearly (#10044)Brad King2011-01-171-6/+8
| | | | | State that the function need only be available at link time. Refer to CheckSymbolExists for verifying that a declaration exists.
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+13
| | | | | | | 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.
* ENH: centralized locaiton of CMakeFiles settingKen Martin2006-06-141-2/+2
|
* ENH: Made Check* modules more consistent and well documented. Added ↵Brad King2006-02-101-4/+18
| | | | CMAKE_REQUIRED_DEFINITIONS option.
* ENH: add documentation support for modulesBill Hoffman2005-12-141-7/+5
|
* DOC: better documentaitonKen Martin2005-11-021-0/+4
|
* ENH: put cmake files intoa CMakeFiles subdir to clean up bin treeKen Martin2005-07-291-2/+2
|
* ENH: Cleanups and add missing CMakeOutput.log and CMakeError.log appending. ↵Andy Cedilnik2003-08-081-0/+3
| | | | Close Bug #136 - Verify that all modules that do try compile produce CMakeError.log and CMakeOutput.log
* ENH: Extra new line after outputAndy Cedilnik2003-07-171-1/+1
|
* ENH: Replace WRITE_FILE with FILE(WRITE and FILE(APPEND. Replace ↵Andy Cedilnik2003-07-111-9/+9
| | | | MAKE_DIRECTORY with FILE(MAKE_DIRECTORY, replace STRING(ASCII things
* Fix problems with required flagsAndy Cedilnik2003-01-041-2/+2
|
* Add required flagsAndy Cedilnik2003-01-041-1/+2
|
* To prevent cmake from breaking up arguments, put quotes around themAndy Cedilnik2003-01-011-1/+1
|
* Add a way to add custom libraries to the mixAndy Cedilnik2003-01-011-0/+5
|
* ENH: use CMAKE_ROOT and not PROJECT_ for try compile stuff, this allows ↵Bill Hoffman2002-12-171-2/+2
| | | | projects within projects to have different languages
* ENH: Don't repeat check even if answer was no.Brad King2002-12-131-2/+2
|
* Add more messages, make messages look the same, add checks if test was ↵Andy Cedilnik2002-11-181-17/+19
| | | | already successfull
* ENH: add status messagesBill Hoffman2002-11-131-0/+3
|
* BUG: Fixed doc string on generated variable.Brad King2002-11-131-2/+2
|
* Add append to write_fileAndy Cedilnik2002-10-291-1/+1
|
* Set variable to either 1 or empty string instead of TRUE and FALSEAndy Cedilnik2002-09-251-2/+5
|
* Fix modules for recent changesAndy Cedilnik2002-09-251-1/+2
|
* Fix tests for new trycompile and tryrunAndy Cedilnik2002-09-201-5/+3
|
* Fix commentAndy Cedilnik2002-09-201-4/+4
|
* Add two commonly used modules. First one checks if the function exists, the ↵Andy Cedilnik2002-09-201-0/+22
second one checks the size of type