Tests: Add case covering transitive find_dependency calls
Issue: #23685
This commit is contained in:
parent
4391808712
commit
591b75ee17
@ -3,6 +3,7 @@ include(RunCMake)
|
||||
# Success tests
|
||||
run_cmake(realistic)
|
||||
run_cmake(basic)
|
||||
run_cmake(transitive)
|
||||
|
||||
# Failure tests
|
||||
run_cmake(invalid-arg)
|
||||
|
14
Tests/RunCMake/find_dependency/transitive-stdout.txt
Normal file
14
Tests/RunCMake/find_dependency/transitive-stdout.txt
Normal file
@ -0,0 +1,14 @@
|
||||
-- begin
|
||||
-- Loading E with components: ''
|
||||
-- Loading A with components: 'A1'
|
||||
-- Loading B with components: 'B1'
|
||||
-- Loading A with components: ''
|
||||
-- Loading C with components: ''
|
||||
-- Loading A with components: ''
|
||||
-- Loading D with components: ''
|
||||
-- Loading A with components: 'A1'
|
||||
-- Loading B with components: ''
|
||||
-- Loading A with components: ''
|
||||
-- Loading C with components: ''
|
||||
-- Loading A with components: ''
|
||||
-- end
|
3
Tests/RunCMake/find_dependency/transitive.cmake
Normal file
3
Tests/RunCMake/find_dependency/transitive.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
message(STATUS "begin")
|
||||
find_package(E REQUIRED NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_SOURCE_DIR}/transitive)
|
||||
message(STATUS "end")
|
1
Tests/RunCMake/find_dependency/transitive/AConfig.cmake
Normal file
1
Tests/RunCMake/find_dependency/transitive/AConfig.cmake
Normal file
@ -0,0 +1 @@
|
||||
message(STATUS "Loading A with components: '${A_FIND_COMPONENTS}'")
|
3
Tests/RunCMake/find_dependency/transitive/BConfig.cmake
Normal file
3
Tests/RunCMake/find_dependency/transitive/BConfig.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
message(STATUS "Loading B with components: '${B_FIND_COMPONENTS}'")
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(A NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
3
Tests/RunCMake/find_dependency/transitive/CConfig.cmake
Normal file
3
Tests/RunCMake/find_dependency/transitive/CConfig.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
message(STATUS "Loading C with components: '${C_FIND_COMPONENTS}'")
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(A NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
5
Tests/RunCMake/find_dependency/transitive/DConfig.cmake
Normal file
5
Tests/RunCMake/find_dependency/transitive/DConfig.cmake
Normal file
@ -0,0 +1,5 @@
|
||||
message(STATUS "Loading D with components: '${D_FIND_COMPONENTS}'")
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(A COMPONENTS A1 NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
||||
find_dependency(B NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
||||
find_dependency(C NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
6
Tests/RunCMake/find_dependency/transitive/EConfig.cmake
Normal file
6
Tests/RunCMake/find_dependency/transitive/EConfig.cmake
Normal file
@ -0,0 +1,6 @@
|
||||
message(STATUS "Loading E with components: '${E_FIND_COMPONENTS}'")
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(A COMPONENTS A1 NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
||||
find_dependency(B COMPONENTS B1 NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
||||
find_dependency(C NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
||||
find_dependency(D NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_LIST_DIR})
|
Loading…
Reference in New Issue
Block a user