diff options
author | Connor Imes <connor.k.imes@gmail.com> | 2022-02-12 15:37:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-14 15:16:52 (GMT) |
commit | 5317015e683b4c94143d25c3316b28ba06215e67 (patch) | |
tree | d8d8eb762d8889080525c238f695701bd859ab3b /Help/manual | |
parent | ba1f706768dbc1620ba164d6f152f5018371ba0e (diff) | |
download | CMake-5317015e683b4c94143d25c3316b28ba06215e67.zip CMake-5317015e683b4c94143d25c3316b28ba06215e67.tar.gz CMake-5317015e683b4c94143d25c3316b28ba06215e67.tar.bz2 |
Help: use package-specific var for supported component list
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
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/cmake-packages.7.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst index 5c109ff..ed85dc4 100644 --- a/Help/manual/cmake-packages.7.rst +++ b/Help/manual/cmake-packages.7.rst @@ -446,10 +446,10 @@ be true. This can be tested with logic in the package configuration file: include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsMacros.cmake") - set(_supported_components Plot Table) + set(_ClimbingStats_supported_components Plot Table) foreach(_comp ${ClimbingStats_FIND_COMPONENTS}) - if (NOT ";${_supported_components};" MATCHES ";${_comp};") + if (NOT ";${_ClimbingStats_supported_components};" MATCHES ";${_comp};") set(ClimbingStats_FOUND False) set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}") endif() |