summaryrefslogtreecommitdiffstats
path: root/Modules/CheckStructHasMember.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Consistently use 2 space indentationKitware Robot2019-05-141-23/+23
|
* Check* functions family: add support for LINK_OPTIONSMarc Chevrier2018-12-011-11/+17
| | | | Fixes: #18521
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-36/+37
|
* Check*: Added include guardsCristian Adam2017-12-011-0/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-13/+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.
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-1/+1
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* CheckStructHasMember: fix null deref warning (#15413)Peter Wu2015-02-201-1/+1
| | | | | | Clang Static Analyzer is so smart that it reports a defect when this intended null-deref is encountered. Use sizeof instead which has no runtime effects.
* CheckStructHasMember: Avoid clang -Wall breakage (#15203)Peter Wu2014-10-301-2/+1
| | | | | | With CMAKE_C_COMPILER=clang and CMAKE_C_FLAGS='-Wall -Werror', this test breaks with -Werror,-Wuninitialized. Fix this by getting rid of the temporary variable.
* CheckStructHasMember: avoid breakage on -Wall -Werror (#15203)Peter Wu2014-10-131-1/+1
| | | | | With CMAKE_C_FLAGS='-Wall -Werror', this test breaks due to -Werror=unused-value. Fix this by ignoring the return value.
* Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.Clinton Stimpson2014-03-301-0/+1
| | | | | 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.
* Help: Fix some erroneous code block markers in Module docs.Stephen Kelly2014-01-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many style errors in these files. This patch fixes only the syntactical errors. The script which ported these to rst tripped on some incorrectly formatted blocks in the original input documentation. Use a new script to find problematic code (and then fix them manually): #!/usr/bin/env python import os rootDir = '.' def checkFile(fname): f = open(fname) lines = f.readlines() started = False counter = 0 for l in lines: if "#" in l: started = True elif started: return lin = l.find("(") if lin != -1 and l.find(")", lin) == -1 and \ not "(To distribute this file outside of CMake, substitute the full" in l: for lp in lines[counter+1:]: if lp == "# ::\n": print "\n\n######### " + fname + "\n\n" print ''.join(lines[max(counter-2, 0):counter+6]) break elif lp == "#\n" : continue break counter += 1 for dirName, subdirList, fileList in os.walk(rootDir): for fname in fileList: checkFile(os.path.join(dirName, fname))
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-14/+33
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* CheckStructHasMember: Add support for C++Daniele E. Domenichelli2013-10-081-9/+26
| | | | | | | | | | | | | | Previously if headers required to check if a struct has a member can be compiled with C++ compiler only, the check would fail because the C compiler fails. As a consequence, the result variable would be set to false, even if the struct has that particular member. Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE that allows one to explicitly set the compiler to use. The new signature is therefore: CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable> [LANGUAGE <language>])
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-2/+2
| | | | | | | | | | | | | | | | | 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-8/+8
| | | | | | | | | | | | | | | | | 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
* 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/+12
| | | | | | | 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: add macro to test if a member has specified struct, e.g.Alexander Neundorf2007-07-121-0/+39
check_struct_has_member("struct stat" st_rdev "${CFG_HEADERS}" HAVE_STRUCT_STAT_ST_RDEV) Alex