
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
12 lines
394 B
CMake
12 lines
394 B
CMake
@PACKAGE_INIT@
|
|
|
|
set(_MathFunctions_supported_components Addition SquareRoot)
|
|
|
|
foreach(_comp ${MathFunctions_FIND_COMPONENTS})
|
|
if (NOT _comp IN_LIST _MathFunctions_supported_components)
|
|
set(MathFunctions_FOUND False)
|
|
set(MathFunctions_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
|
|
endif()
|
|
include("${CMAKE_CURRENT_LIST_DIR}/MathFunctions${_comp}Targets.cmake")
|
|
endforeach()
|