summaryrefslogtreecommitdiffstats
path: root/Modules/CheckCXXSourceCompiles.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Fix spelling of "succeeded" in check messagesTerrell Russell2015-10-061-1/+1
| | | | Change "succeded" to "succeeded" everywhere.
* 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*: 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-10/+21
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* 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-44/+44
| | | | | | | | | | | | | | | | | 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
* Document Check(C|CXX)SourceCompiles behavior more clearly (#11688)Brad King2011-01-141-2/+2
| | | | | Explicitly state up front that the macros try to link an executable and that the source provided must define 'main'.
* 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.
* Add FAIL_REGEX to CHECK_(C|CXX)_SOURCE_COMPILESBrad King2009-09-171-1/+21
| | | | | | 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.
* Cleanup generic compiler check macro documentationBrad King2009-09-171-6/+4
| | | | | | | | | | | | | | | 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.
* STYLE: fix documentation: the second short description discarded the firstAlexander Neundorf2009-03-111-2/+2
| | | | | | | one, but the first one was the correct one (i.e. the one which mentioned that CheckC[XX]SourceRuns.cmake also tries to run the executable) Alex
* STYLE: fix #3519 (incorrect comment)Alexander Neundorf2006-08-271-4/+4
| | | | Alex
* ENH: fixs for check compile stuff from Oswald B.Bill Hoffman2006-08-211-3/+3
|
* BUG: Make sure try-compile source ends in a newline.Brad King2006-06-281-1/+1
|
* ENH: centralized locaiton of CMakeFiles settingKen Martin2006-06-141-4/+4
|
* BUG: Use the extra definicionsAndy Cedilnik2006-04-271-1/+1
|
* ENH: append to log filesBill Hoffman2006-04-191-4/+4
|
* ENH: Cleanup bootstrap even moreAndy Cedilnik2006-03-221-2/+2
|
* ENH: Made Check* modules more consistent and well documented. Added ↵Brad King2006-02-101-3/+8
| | | | CMAKE_REQUIRED_DEFINITIONS option.
* ENH: Patch from Alexander Neundorf to improve behavior.Brad King2006-02-091-0/+4
|
* ENH: fix bug, write the correct fileAndy Cedilnik2006-01-241-1/+1
|
* ENH: put CmakeTmp into CMakeFilesKen Martin2006-01-121-4/+4
|
* ENH: some style fixes for the bookKen Martin2005-12-151-3/+3
|
* ENH: add documentation support for modulesBill Hoffman2005-12-141-9/+7
|
* ENH: Add C++ test tooAndy Cedilnik2005-08-011-0/+53