summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt
new file mode 100644
index 000000000..468bf781c
--- /dev/null
+++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_library(ImportedSubdirTarget1 SHARED IMPORTED GLOBAL)
+add_library(ImportedSubdirTarget2 SHARED IMPORTED)
+
+# Extend visibility of ImportedSubdirTarget2 to global scope.
+set_property(TARGET ImportedSubdirTarget2 PROPERTY IMPORTED_GLOBAL TRUE)
+
+# Only targets from the same directory can be promoted.
+set_property(TARGET ImportedLocalTarget2 PROPERTY IMPORTED_GLOBAL TRUE)