summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-11 10:11:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-06-11 10:11:42 (GMT)
commitf597bb396edfde86cfb953faf841940e58a0cd6e (patch)
tree70259a9486398dce98ad47e03176d5cfd30faf8c /Tests
parent15b1d5ab9cdb8cafe74d0a30ca46d6a06e1838b7 (diff)
parente13704ce72a49684a835ab7ee3db9c2a928b5db5 (diff)
downloadCMake-f597bb396edfde86cfb953faf841940e58a0cd6e.zip
CMake-f597bb396edfde86cfb953faf841940e58a0cd6e.tar.gz
CMake-f597bb396edfde86cfb953faf841940e58a0cd6e.tar.bz2
Merge topic 'dir-IMPORTED_TARGETS'
e13704ce72 Add directory property to list imported targets ea6d338ea1 cmState: Record imported target names in each directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6215
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/get_property/directory_properties-stderr.txt4
-rw-r--r--Tests/RunCMake/get_property/directory_properties.cmake5
-rw-r--r--Tests/RunCMake/get_property/directory_properties/CMakeLists.txt3
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_property/directory_properties-stderr.txt b/Tests/RunCMake/get_property/directory_properties-stderr.txt
index 89f5618..be06f0e 100644
--- a/Tests/RunCMake/get_property/directory_properties-stderr.txt
+++ b/Tests/RunCMake/get_property/directory_properties-stderr.txt
@@ -12,6 +12,10 @@ get_directory_property: -->CustomTop;InterfaceTop<--
get_property: -->CustomTop;InterfaceTop<--
get_directory_property: -->CustomSub;InterfaceSub<--
get_property: -->CustomSub;InterfaceSub<--
+get_directory_property: -->Imported1Top;Imported2Top<--
+get_property: -->Imported1Top;Imported2Top<--
+get_directory_property: -->Imported1Sub;Imported2Sub<--
+get_property: -->Imported1Sub;Imported2Sub<--
get_directory_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
get_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
get_directory_property: -->[^<;]*/RunCMake/get_property<--
diff --git a/Tests/RunCMake/get_property/directory_properties.cmake b/Tests/RunCMake/get_property/directory_properties.cmake
index 9b978fd..4dce524 100644
--- a/Tests/RunCMake/get_property/directory_properties.cmake
+++ b/Tests/RunCMake/get_property/directory_properties.cmake
@@ -18,11 +18,16 @@ add_custom_target(CustomTop)
add_library(InterfaceTop INTERFACE)
add_library(my::InterfaceTop ALIAS InterfaceTop)
+add_library(Imported1Top INTERFACE IMPORTED)
+add_library(Imported2Top INTERFACE IMPORTED)
+
add_subdirectory(directory_properties)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SUBDIRECTORIES)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" SUBDIRECTORIES)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BUILDSYSTEM_TARGETS)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" BUILDSYSTEM_TARGETS)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" IMPORTED_TARGETS)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" IMPORTED_TARGETS)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BINARY_DIR)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SOURCE_DIR)
diff --git a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
index 95106ad..9fab799 100644
--- a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
+++ b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
@@ -5,5 +5,8 @@ add_custom_target(CustomSub)
add_library(InterfaceSub INTERFACE)
add_library(my::InterfaceSub ALIAS InterfaceSub)
+add_library(Imported1Sub INTERFACE IMPORTED)
+add_library(Imported2Sub INTERFACE IMPORTED)
+
add_test(Sub/test1 COMMAND "${CMAKE_COMMAND}" -E echo "Sub/test1")
add_test(Sub/test2 COMMAND "${CMAKE_COMMAND}" -E echo "Sub/test2")