summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-packages.7.rst
Commit message (Collapse)AuthorAgeFilesLines
* Help: use package-specific var for supported component listConnor Imes2022-02-141-2/+2
| | | | | | | | | | | | Always using `_supported_components` causes conflicts when transitive dependencies also set this variable, e.g., because the developers followed these code samples. An even more general approach could be to set `_${CMAKE_FIND_PACKAGE_NAME}_supported_components` instead, but such a change should then be applied to other variables for consistency. Fixes: #23112
* Help: Fix regex in example of cmake-packages(7) Johel Ernesto Guerrero Peña2021-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it work as intended as opposed to make the condition always true. This can be confirmed by running the following script: ``` [johel@sundown tmp]$ cat x.cmake function(f) set(valid_inputs abc 123) foreach(input ${ARGV}) if(";${valid_inputs};" MATCHES input) message("old valid: ${input}") endif() if(";${valid_inputs};" MATCHES ";${input};") message("new valid: ${input}") endif() endforeach() endfunction() f("0;z;123;12;abc;ab;13;ac") set(_supported_components Plot Table) set(ClimbingStats_FIND_COMPONENTS Plot Table P T) foreach(_comp ${ClimbingStats_FIND_COMPONENTS}) if(NOT ";${_supported_components};" MATCHES _comp) message("old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE \"Unsupported component: ${_comp}\")") endif() if(NOT ";${_supported_components};" MATCHES ";${_comp};") message("new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE \"Unsupported component: ${_comp}\")") endif() endforeach() [johel@sundown tmp]$ cmake -P x.cmake new valid: 123 new valid: abc old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: Plot") old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: Table") old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: P") new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: P") old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: T") new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: T") ```
* find_package: Add variable to make package REQUIREDEugene Shalygin2021-07-081-1/+3
| | | | | | | | | | | | | | Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite behaviour: it turns non-required find_package call into the required one. While optional package dependencies usually result in simple and clean build logic, sometimes people want to be sure those optional dependencies will be found and used. Examples are reproducible builds and build instructions for 3rd parties. People choose to make find_package calls REQUIRED and put them behind an option(). Such workarounds blend build logic with build environment management and do not look elegant.
* Find: find_package prefers variable CMAKE_FIND_USE_REGISTRYRobert Maynard2019-07-091-2/+7
| | | | | | CMake's find control flags should all have a consistent name. To make this happen we are introducing `CMAKE_FIND_USE_REGISTRY` and deprecating `CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`.
* Help: Improve formatting of Help documentationBartosz Kosiorek2019-04-081-1/+1
|
* export: Disable PACKAGE mode user package registry by defaultRobert Maynard2019-03-151-6/+11
| | | | | | | The user package registry populated by the `export()` command causes side effects outside the build and source directories. Such effects should be opt-in rather than op-out. Introduce a policy to change default behavior of `export(PACKAGE)` to do nothing.
* doc: Consistently use <PackageName> for describing the name of a packageJean-Christophe Fillion-Robin2018-08-141-25/+25
|
* Help: Fix typo in <pkg>_NOT_FOUND_MESSAGE example in cmake-packages(7)Brad King2017-02-011-2/+2
| | | | Fixes: #16616
* Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-1/+1
| | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* Help: Fix typos in cmake-packages.7 manualAshley Whetter2016-02-241-5/+5
|
* Help: Update discussion of relocable packages in cmake-packages(7)Brad King2015-04-031-20/+46
| | | | | | | | | | Explain at the beginning of the section the requirements for a package to be relocatable to justify the rest of the section content. Generalize example to use fictional package names instead of real ones, especially because FindBoost provides no alternative yet. Reword the discussion to represent the preferred approach as "ideal" but also suggest workarounds when find modules do not provide the imported targets.
* Help: Reorganize and refine discussion of relocatable packagesBrad King2015-04-031-70/+82
| | | | | | | | | | | | | | | | | | | | | | | Re-organize the content added to the cmake-packages(7) manual by * commit v3.0.0-rc1~184^2 (Help: Document export(EXPORT) in the cmake-packages manual, 2013-12-23), * commit v3.0.0-rc1~154^2~1 (Help: Add notes about relocatability of config-file packages, 2014-01-07), and * commit v3.2.0-rc1~345^2 (Help: Warn that paths should not be used in INTERFACE_ build properties, 2014-11-22). These commits broke the natural flow of the original manual and made wording after the new content make less sense. Move the content into new subsections to restore the flow of the original manual and to make explicitly the purpose of the new content. Shorten the relocatable usage requirement "warnings". Refer to the new cmake-packages(7) manual subsection to reduce duplication. Also clarify the distinction between paths to library dependencies and paths to their header files.
* Help: Fix typo in cmake-packages(7) manualBrad King2015-04-031-1/+1
| | | | relevnt => relevant
* Help: Fix syntax in non-relocatable usage requirements exampleBrad King2015-04-031-4/+4
| | | | | The example in cmake-packages(7) is meant to be incorrect for use of absolute paths, not for its syntax.
* Help: Add some cross-linking.Stephen Kelly2015-02-041-1/+1
|
* Help: Link to cmake-packages(7) from the Module creation documentation.Stephen Kelly2014-12-041-0/+2
|
* Help: Warn that paths should not be used in INTERFACE_ build properties.Stephen Kelly2014-11-251-0/+34
|
* Merge topic 'doc-formatting'Brad King2014-11-071-1/+2
|\ | | | | | | | | f0ca3ef0 Help: Wrap long lines in pre-formatted documentation blocks
| * Help: Wrap long lines in pre-formatted documentation blocksBrad King2014-11-071-1/+2
| | | | | | | | Help format the blocks better for display without a wide screen.
* | Merge branch 'release-doc-formatting' into doc-formattingBrad King2014-11-061-2/+2
|\ \ | |/ | | | | | | Resolve conflict in Modules/ExternalProject.cmake by keeping our side, which is more completely revised.
| * Help: Fix example in cmake-packages to avoid long lineBrad King2014-11-061-1/+1
| |
| * Help: Drop TOC from latex manualsBrad King2014-11-061-1/+1
| | | | | | | | A latex document can have its own TOC.
* | Help: Fix configure_file call to use COPYONLY, not COPY_ONLYIosif Neitzke2014-10-311-1/+1
|/ | | | | The configure_file signature has option 'COPYONLY' (no underscore). Fix the example in 'cmake-packages.7.rst'.
* Revert "Help: Update cmake-packages.7 examples to import targets only once"Brad King2014-07-151-11/+4
| | | | | | This reverts commit cfab942e5ff8463f8053564e68179da110280b43. Since commit v2.8.11~362^2 (Generate an early-return guard in target Export files, 2012-11-30) an external include guard is not needed.
* Help: Update cmake-packages.7 examples to import targets only onceBrad King2014-07-091-4/+11
| | | | | | Package configuration files should load their targets files at most once in a given scope. Update our ClimbingStats example to show how to do this.
* Allow the Package Registry to be disabled (#14849)Daniele E. Domenichelli2014-05-121-0/+15
| | | | | | | | | | | | | | | | When a project is packaged for redistribution the local package registries should not be updated or consulted. They are for developers. Add variables to disable use of package registries globally: * CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE) command * CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package Registry in all the find_package calls. * CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the System Package Registry in all the find_package calls. Update documentation and unit tests.
* Help: Document the package registry in cmake-packages.7Brad King2014-02-171-0/+129
| | | | | | | | Port documentation from the CMake Wiki page at: http://www.cmake.org/Wiki/CMake/Tutorials/Package_Registry as of 2014-02-17 into our main documentation.
* Help: Add notes about relocatability of config-file packages.Stephen Kelly2014-01-091-4/+34
|
* Help: Document the target properties exported to IMPORTED targets.Stephen Kelly2014-01-071-0/+22
|
* Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.Stephen Kelly2014-01-071-0/+4
|
* Help: Mark some code blocks as containing cmake code.Stephen Kelly2014-01-041-1/+3
|
* Help: Document export(EXPORT) in the cmake-packages manual.Stephen Kelly2013-12-241-2/+20
|
* Don't copy find_dependency in configure_package_config_file.Stephen Kelly2013-12-241-2/+2
| | | | | | | There is not really any need to. Downstreams can either rely on it being provided by CMake, or copy and distribute it. Change the documented include for the find_dependency macro.
* Help: cmake-packages: Add missing slash.Stephen Kelly2013-12-241-1/+1
|
* Help: Add a CMake manual for Packages related docs.Stephen Kelly2013-12-201-0/+414