diff options
Diffstat (limited to 'Tests/RunCMake/TargetPropertyGeneratorExpressions')
4 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-result.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt new file mode 100644 index 0000000..d2ac7a9 --- /dev/null +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt @@ -0,0 +1,6 @@ +CMake Error: + Error evaluating generator expression: + + \$<TARGET_PROPERTY:NonExistant,INCLUDE_DIRECTORIES> + + Target "NonExistant" not found.$ diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget.cmake new file mode 100644 index 0000000..b020c08 --- /dev/null +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget.cmake @@ -0,0 +1,7 @@ + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" + "int main(int, char **) { return 0; }\n") + +add_executable(TargetPropertyGeneratorExpressions + "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") +include_directories("$<TARGET_PROPERTY:NonExistant,INCLUDE_DIRECTORIES>") diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake index f2ff05b..e2abd56 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake @@ -6,3 +6,4 @@ run_cmake(BadSelfReference3) run_cmake(BadSelfReference4) run_cmake(BadSelfReference5) run_cmake(BadSelfReference6) +run_cmake(BadNonTarget) |