mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
Tests: Add case covering transitive find_dependency calls
Issue: #23685
This commit is contained in:
1 parent
4391808712
commit
591b75ee17
8 files changed
+36
No files matched your search
@@ -3,6 +3,7 @@ include(RunCMake)
|
||||
# Success tests
|
||||
run_cmake(realistic)
|
||||
run_cmake(basic)
|
||||
run_cmake(transitive)
|
||||
|
||||
# Failure tests
|
||||
run_cmake(invalid-arg)
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,3 @@
|
||||
message(STATUS "begin")
|
||||
find_package(E REQUIRED NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_SOURCE_DIR}/transitive)
|
||||
message(STATUS "end")
|
||||
@@ -0,0 +1 @@
|
||||
message(STATUS "Loading A with components: '${A_FIND_COMPONENTS}'")
|
||||
@@ -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})
|
||||
@@ -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})
|
||||
@@ -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})
|
||||
@@ -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})
|
||||
Reference in new issue
Block a user