summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFindPackageMode.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* CMakeFindPackageMode: Fix Debian multiarch default guess (#15250)Felix Geyer2015-01-191-2/+5
| | | | | | | | In commit v2.8.6~102^2~18 (Better support for lib64 and Debian multiarch, 2011-07-14) variable names "..._LANGUAGE_ARCHITECTURE" were set instead of the correct "..._LIBRARY_ARCHITECTURE". Fix this typo and also set the language-independent variable CMAKE_LIBRARY_ARCHITECTURE.
* Modules: Format documentation to avoid over-long preformatted linesBrad King2014-10-221-9/+18
| | | | | | Convert several preformatted code block literals that enumerate lists of options or variables to use reST definition lists instead. Manually wrap other long lines in code blocks.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-9/+18
| | | | | | | | 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
|
* OS X: Always generate -isysroot if any SDK is in useBrad King2012-09-211-2/+2
| | | | | | | | Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT. Replace internal platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general CMAKE_${lang}_SYSROOT_FLAG variable. If the -isysroot flag exists and CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to compiler command lines. This is already done in the Xcode IDE.
* Make platform information files specific to the CMake versionBrad King2012-08-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the top of a build tree we configure inside the CMakeFiles directory files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to save information detected about the system and compilers in use. The method of detection and the exact results store varies across CMake versions as things improve. This leads to problems when loading files configured by a different version of CMake. Previously we ignored such existing files only if the major.minor part of the CMake version component changed, and depended on the CMakeCache.txt to tell us the last version of CMake that wrote the files. This led to problems if the user deletes the CMakeCache.txt or we add required information to the files in a patch-level release of CMake (still a "feature point" release by modern CMake versioning convention). Ensure that we always have version-consistent platform information files by storing them in a subdirectory named with the CMake version. Every version of CMake will do its own system and compiler identification checks even when a build tree has already been configured by another version of CMake. Stored results will not clobber those from other versions of CMake which may be run again on the same tree in the future. Loaded results will match what the system and language modules expect. Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to CMAKE_PLATFORM_INFO_DIR to clarify its purpose. The new variable points at the version-specific directory while the old variable did not.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | 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
* CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlinkYury G. Kudryashov2012-02-281-1/+2
|
* Fix --find-package mode on Cygwin, where enable_language(RC) is calledAlex Neundorf2011-08-221-0/+6
| | | | | | | | In --find-package mode we can't enable a language, since a lot of stuff has not been set up, e.g. which make tool to use. So disable enable_language() in this mode. Alex
* Require the current cmake version in --find-package modeAlex Neundorf2011-08-221-0/+3
| | | | | | | | This fixes the problem that otherwise Platforms/CYGWIN.cmake doesn't know whether it should set WIN32 or not. Now it uses always the current behaviour. Alex
* Dont check for -isysroot and -mmacosx-version on OSX in --find-package modeAlex Neundorf2011-08-151-0/+6
| | | | Alex
* Rename helper macros print_compile_flags() to set_compile_flags_var()Alex Neundorf2011-08-151-4/+4
| | | | | | | | The same for print_link_flags(), it is now set_link_flags_var(). Both macros don't print anything anymore, this was only in the beginning. Alex
* Improve documentation for --find-package modeAlex Neundorf2011-08-111-6/+10
| | | | Alex
* Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfigAlex Neundorf2011-08-111-1/+1
| | | | | | | This file has been written today from scratch by Matthias Kretz and it BSD-licensed. Alex
* Use the file-utility to test for 64bit if there is no /usr/lib64Alex Neundorf2011-08-091-2/+9
| | | | Alex
* Better support for lib64 and Debian multiarchAlex Neundorf2011-08-091-3/+26
| | | | | | | | | | | | If CMAKE_SIZEOF_VOID_P is not set from the outside, it checks for the existance of /usr/lib64, and if it exists, SIZEOF_VOID_P is set to 8. For multiarch, if this is debian and CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE has not been set, it globs for the files in /lib, and uses the first one which matches CMAKE_LIBRARY_ARCHITECTURE_REGEX. Alex
* Fix copyright notice in new CMakeFindPackageMode.cmakeAlex Neundorf2011-08-091-0/+13
| | | | Alex
* Implement find-package mode of cmakeAlex Neundorf2011-07-021-0/+125
In find-package mode, cmake executes Modules/CMakeFindPackage.cmake, which calls find_package(), and this is then evaluated in cmake.cxx, which prints an appropriate message to stdout, so it can be used e.g. in a normal Makefile: $ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST JPEG found. $ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=COMPILE $ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=LINK -rdynamic -ljpeg Alex