summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-15 15:44:51 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-15 15:45:21 (GMT)
commit11b21ae14abb183a8c53324b7ae9e16fa02bf0bb (patch)
tree546ddae782386a9b160bc263dbfbb61f4e5174e2 /Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
parenta4d0e4ff8f10b9ec6cc175765d8ec15b5e780b0d (diff)
downloadCMake-11b21ae14abb183a8c53324b7ae9e16fa02bf0bb.zip
CMake-11b21ae14abb183a8c53324b7ae9e16fa02bf0bb.tar.gz
CMake-11b21ae14abb183a8c53324b7ae9e16fa02bf0bb.tar.bz2
Tests: Move some cases to RunCMake.GenEx-TARGET_PROPERTY
Move some `TARGET_PROPERTY` cases from `RunCMake.GeneratorExpression`.
Diffstat (limited to 'Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake')
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
new file mode 100644
index 0000000..212c034
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake
@@ -0,0 +1,16 @@
+
+cmake_minimum_required(VERSION 3.17)
+
+add_library(lib-global SHARED IMPORTED GLOBAL)
+add_library(alias-lib-global ALIAS lib-global)
+
+add_library(lib-local SHARED IMPORTED)
+add_library(alias-lib-local ALIAS lib-local)
+
+add_library(lib SHARED IMPORTED)
+add_library(alias-lib ALIAS lib)
+# switch from local to global
+set_property (TARGET lib PROPERTY IMPORTED_GLOBAL TRUE)
+
+
+file(GENERATE OUTPUT alias_global.txt CONTENT "$<TARGET_PROPERTY:lib-global,IMPORTED_GLOBAL>($<TARGET_PROPERTY:alias-lib-global,ALIASED_TARGET>):$<TARGET_PROPERTY:alias-lib-global,ALIAS_GLOBAL>\n$<TARGET_PROPERTY:lib-local,IMPORTED_GLOBAL>($<TARGET_PROPERTY:alias-lib-local,ALIASED_TARGET>):$<TARGET_PROPERTY:alias-lib-local,ALIAS_GLOBAL>\n$<TARGET_PROPERTY:lib,IMPORTED_GLOBAL>($<TARGET_PROPERTY:alias-lib,ALIASED_TARGET>):$<TARGET_PROPERTY:alias-lib,ALIAS_GLOBAL>\n")