summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-TARGET_PROPERTY
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-15 15:22:35 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-15 15:24:07 (GMT)
commite855ed7fdee75e5669847192f5c2c1d088db6f5f (patch)
treed59b9130c6eaed558afb52a616c783e9e03952f8 /Tests/RunCMake/GenEx-TARGET_PROPERTY
parent88c4006f054bd3a2233ce607e22d961f106c3512 (diff)
downloadCMake-e855ed7fdee75e5669847192f5c2c1d088db6f5f.zip
CMake-e855ed7fdee75e5669847192f5c2c1d088db6f5f.tar.gz
CMake-e855ed7fdee75e5669847192f5c2c1d088db6f5f.tar.bz2
Tests: Rename RunCMake.TargetPropertyGeneratorExpressions for consistency
Rename the test to `RunCMake.GenEx-TARGET_PROPERTY` for consistency with the other `RunCMake.GenEx-*` test names.
Diffstat (limited to 'Tests/RunCMake/GenEx-TARGET_PROPERTY')
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-stderr.txt52
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName1/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName2/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName3/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName4/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName5/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName6/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName7/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName8/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget.cmake6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-stderr.txt39
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference.cmake6
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference1/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference2/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference3/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference4/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference5/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference6/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2.cmake8
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3.cmake10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4.cmake14
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5.cmake10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-result.txt1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-stderr.txt10
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6.cmake14
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.cpp7
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/main.cpp4
44 files changed, 302 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-stderr.txt
new file mode 100644
index 0000000..6da79b7
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName-stderr.txt
@@ -0,0 +1,52 @@
+^(CMake Error at BadInvalidName1/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>
+
+ Target name not supported.
++)+(CMake Error at BadInvalidName2/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:Invali/dTarget,Invali/dProperty>
+
+ Target name and property name not supported.
++)+(CMake Error at BadInvalidName3/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:Invali/dProperty>
+
+ Property name not supported.
++)+(CMake Error at BadInvalidName4/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:BadInvalidName4,Invali/dProperty>
+
+ Property name not supported.
++)+(CMake Error at BadInvalidName5/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:,>
+
+ \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name and
+ property name.
++)+(CMake Error at BadInvalidName6/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:,ValidProperty>
+
+ \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.
++)+(CMake Error at BadInvalidName7/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:BadInvalidName7,>
+
+ \$<TARGET_PROPERTY:...> expression requires a non-empty property name.
++)+(CMake Error at BadInvalidName8/CMakeLists\.txt:[0-9]+ \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:>
+
+ \$<TARGET_PROPERTY:...> expression requires a non-empty property name.
+*)+
++
+CMake Generate step failed\. Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName.cmake
new file mode 100644
index 0000000..5f083e2
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName.cmake
@@ -0,0 +1,8 @@
+add_subdirectory(BadInvalidName1)
+add_subdirectory(BadInvalidName2)
+add_subdirectory(BadInvalidName3)
+add_subdirectory(BadInvalidName4)
+add_subdirectory(BadInvalidName5)
+add_subdirectory(BadInvalidName6)
+add_subdirectory(BadInvalidName7)
+add_subdirectory(BadInvalidName8)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName1/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName1/CMakeLists.txt
new file mode 100644
index 0000000..13e1de7
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName1/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName1 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName2/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName2/CMakeLists.txt
new file mode 100644
index 0000000..4b78472
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName2/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName2 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:Invali/dTarget,Invali/dProperty>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName3/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName3/CMakeLists.txt
new file mode 100644
index 0000000..516a049
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName3/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName3 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:Invali/dProperty>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName4/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName4/CMakeLists.txt
new file mode 100644
index 0000000..02f2a1a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName4/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName4 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:BadInvalidName4,Invali/dProperty>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName5/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName5/CMakeLists.txt
new file mode 100644
index 0000000..a653583
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName5/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName5 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:,>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName6/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName6/CMakeLists.txt
new file mode 100644
index 0000000..614458e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName6/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName6 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:,ValidProperty>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName7/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName7/CMakeLists.txt
new file mode 100644
index 0000000..8a9fe80
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName7/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName7 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:BadInvalidName7,>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName8/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName8/CMakeLists.txt
new file mode 100644
index 0000000..b228159
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadInvalidName8/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadInvalidName8 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-stderr.txt
new file mode 100644
index 0000000..0c9320b
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at BadNonTarget.cmake:6 \(include_directories\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:NonExistent,INCLUDE_DIRECTORIES>
+
+ Target "NonExistent" not found.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Generate step failed\. Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget.cmake
new file mode 100644
index 0000000..334d7c3
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadNonTarget.cmake
@@ -0,0 +1,6 @@
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+ "int main(int, char **) { return 0; }\n")
+
+add_executable(main "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+include_directories("$<TARGET_PROPERTY:NonExistent,INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-stderr.txt
new file mode 100644
index 0000000..fa26861
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference-stderr.txt
@@ -0,0 +1,39 @@
+^(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>
+
+ Self reference on target "BadSelfReference1".
++)+(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>
+
+ Self reference on target "BadSelfReference2".
++)+(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:BadSelfReference3,INCLUDE_DIRECTORIES>
+
+ Self reference on target "BadSelfReference3".
++)+(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:BadSelfReference4,INCLUDE_DIRECTORIES>
+
+ Self reference on target "BadSelfReference4".
++)+(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:COMPILE_DEFINITIONS>
+
+ Self reference on target "BadSelfReference5".
++)+(CMake Error:
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:BadSelfReference6,COMPILE_DEFINITIONS>
+
+ Self reference on target "BadSelfReference6".
+*)+
++
+CMake Generate step failed\. Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference.cmake
new file mode 100644
index 0000000..5a99f7a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference.cmake
@@ -0,0 +1,6 @@
+add_subdirectory(BadSelfReference1)
+add_subdirectory(BadSelfReference2)
+add_subdirectory(BadSelfReference3)
+add_subdirectory(BadSelfReference4)
+add_subdirectory(BadSelfReference5)
+add_subdirectory(BadSelfReference6)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference1/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference1/CMakeLists.txt
new file mode 100644
index 0000000..30c27f5
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference1/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference1 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference2/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference2/CMakeLists.txt
new file mode 100644
index 0000000..c2322f4
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference2/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference2 ../main.cpp)
+set_property(TARGET BadSelfReference2 PROPERTY INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference3/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference3/CMakeLists.txt
new file mode 100644
index 0000000..3e6c30a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference3/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference3 ../main.cpp)
+include_directories("$<TARGET_PROPERTY:BadSelfReference3,INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference4/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference4/CMakeLists.txt
new file mode 100644
index 0000000..f79727a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference4/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference4 ../main.cpp)
+set_property(TARGET BadSelfReference4 PROPERTY INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:BadSelfReference4,INCLUDE_DIRECTORIES>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference5/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference5/CMakeLists.txt
new file mode 100644
index 0000000..c0badbf
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference5/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference5 ../main.cpp)
+set_property(TARGET BadSelfReference5 PROPERTY COMPILE_DEFINITIONS "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference6/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference6/CMakeLists.txt
new file mode 100644
index 0000000..fcb6b3c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/BadSelfReference6/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(BadSelfReference6 ../main.cpp)
+set_property(TARGET BadSelfReference6 PROPERTY COMPILE_DEFINITIONS "$<TARGET_PROPERTY:BadSelfReference6,COMPILE_DEFINITIONS>")
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt
new file mode 100644
index 0000000..c3922d6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt
@@ -0,0 +1,8 @@
+
+cmake_minimum_required(VERSION 3.3)
+project(${RunCMake_TEST} CXX)
+
+# MSVC creates extra targets which pollute the stderr unless we set this.
+set(CMAKE_SUPPRESS_REGENERATION TRUE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-stderr.txt
new file mode 100644
index 0000000..8bff68e
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at LinkImplementationCycle1.cmake:5 \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>
+
+ \$<TARGET_PROPERTY:...> expression in link libraries evaluation depends on
+ target property which is transitive over the link libraries, creating a
+ recursion.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1.cmake
new file mode 100644
index 0000000..4b60214
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle1.cmake
@@ -0,0 +1,8 @@
+
+add_library(empty1 empty.cpp)
+add_library(empty2 empty.cpp)
+
+target_link_libraries(empty1
+ LINK_PUBLIC
+ $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-stderr.txt
new file mode 100644
index 0000000..044b77c
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at LinkImplementationCycle2.cmake:5 \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>
+
+ \$<TARGET_PROPERTY:...> expression in link libraries evaluation depends on
+ target property which is transitive over the link libraries, creating a
+ recursion.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2.cmake
new file mode 100644
index 0000000..557eac1
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle2.cmake
@@ -0,0 +1,8 @@
+
+add_library(empty1 empty.cpp)
+add_library(empty2 empty.cpp)
+
+target_link_libraries(empty1
+ LINK_PUBLIC
+ $<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3.cmake
new file mode 100644
index 0000000..0f921d4
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle3.cmake
@@ -0,0 +1,10 @@
+
+add_library(empty1 empty.cpp)
+add_library(empty2 empty.cpp)
+
+# This is OK, because evaluating the INCLUDE_DIRECTORIES is not affected by
+# the content of the INTERFACE_LINK_LIBRARIES.
+target_link_libraries(empty1
+ INTERFACE
+ $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-stderr.txt
new file mode 100644
index 0000000..d56b199
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Error at LinkImplementationCycle4.cmake:[0-9]+ \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>
+
+ \$<TARGET_PROPERTY:...> expression in link libraries evaluation depends on
+ target property which is transitive over the link libraries, creating a
+ recursion.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4.cmake
new file mode 100644
index 0000000..ab6d0b2
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4.cmake
@@ -0,0 +1,14 @@
+
+add_library(empty1 empty.cpp)
+add_library(empty2 empty.cpp)
+
+# The INTERFACE_INCLUDE_DIRECTORIES do not depend on the link interface.
+# On its own, this is fine. It is only when used by empty3 that an error
+# is appropriately issued.
+target_link_libraries(empty1
+ INTERFACE
+ $<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
+
+add_library(empty3 empty.cpp)
+target_link_libraries(empty3 empty1)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-stderr.txt
new file mode 100644
index 0000000..cf4e6d7
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Error at LinkImplementationCycle5.cmake:[0-9]+ \(set_property\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>
+
+ \$<TARGET_PROPERTY:...> expression in link libraries evaluation depends on
+ target property which is transitive over the link libraries, creating a
+ recursion.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5.cmake
new file mode 100644
index 0000000..dc180e3
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle5.cmake
@@ -0,0 +1,10 @@
+
+add_library(empty1 INTERFACE IMPORTED)
+add_library(empty2 INTERFACE IMPORTED)
+
+set_property(TARGET empty1 PROPERTY INTERFACE_LINK_LIBRARIES
+ $<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
+
+add_library(empty3 empty.cpp)
+target_link_libraries(empty3 empty1)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-result.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-stderr.txt
new file mode 100644
index 0000000..93cb573
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Error at LinkImplementationCycle6.cmake:[0-9]+ \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>
+
+ \$<TARGET_PROPERTY:...> expression in link libraries evaluation depends on
+ target property which is transitive over the link libraries, creating a
+ recursion.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6.cmake
new file mode 100644
index 0000000..91252d0
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle6.cmake
@@ -0,0 +1,14 @@
+
+add_library(empty1 SHARED empty.cpp)
+add_library(empty2 SHARED empty.cpp)
+
+# The INTERFACE_INCLUDE_DIRECTORIES do not depend on the link interface.
+# On its own, this is fine. It is only when used by empty3 that an error
+# is appropriately issued.
+target_link_libraries(empty1
+ INTERFACE
+ $<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
+)
+
+add_library(empty3 SHARED empty.cpp)
+target_link_libraries(empty3 empty1)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake
new file mode 100644
index 0000000..4294e9f
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/RunCMakeTest.cmake
@@ -0,0 +1,11 @@
+include(RunCMake)
+
+run_cmake(BadSelfReference)
+run_cmake(BadNonTarget)
+run_cmake(BadInvalidName)
+run_cmake(LinkImplementationCycle1)
+run_cmake(LinkImplementationCycle2)
+run_cmake(LinkImplementationCycle3)
+run_cmake(LinkImplementationCycle4)
+run_cmake(LinkImplementationCycle5)
+run_cmake(LinkImplementationCycle6)
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.cpp b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.cpp
new file mode 100644
index 0000000..11ec041
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/empty.cpp
@@ -0,0 +1,7 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ int empty()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.cpp b/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.cpp
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/main.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}