mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
In commit c6e6861e63 (install(EXPORT): Export find_dependency() calls,
2023-11-07, v3.29.0-rc1~439^2~1) we made the calls `REQUIRED`. However,
a dependency is only required if the dependent package is required.
`find_dependency` already forwards the `REQUIRED` mark, and also already
marks the dependent package as not found if the dependency is missing.
Fixes: #25756
5 lines
290 B
CMake
5 lines
290 B
CMake
file(READ "${RunCMake_TEST_BINARY_DIR}/root-all/lib/cmake/mylib/mylib-targets.cmake" contents)
|
|
if(NOT contents MATCHES "include\\(CMakeFindDependencyMacro\\)\nfind_dependency\\(P2\\)\nfind_dependency\\(P1\\)\n")
|
|
set(RunCMake_TEST_FAILED "Dependencies were not properly exported")
|
|
endif()
|