| foreach(name IN ITEMS | |
| TestDependencyExe | |
| TestDependencyGenex | |
| TestDependencyPrereq | |
| TestDependencyFile | |
| TestDependencySubdirPrereq | |
| TestDependencySubdirFile | |
| TestDependencySubdirRelative) | |
| set(candidates) | |
| list(APPEND candidates | |
| "${RunCMake_TEST_BINARY_DIR}/${name}-built.txt") | |
| list(APPEND candidates | |
| "${RunCMake_TEST_BINARY_DIR}/TestDependencySubdir/${name}-built.txt") | |
| set(found FALSE) | |
| foreach(path IN LISTS candidates) | |
| if(EXISTS "${path}") | |
| set(found TRUE) | |
| break() | |
| endif() | |
| endforeach() | |
| if(NOT found) | |
| message(FATAL_ERROR | |
| "Expected ${name}-built.txt not found.") | |
| endif() | |
| endforeach() | |
| set(prereq_file "${RunCMake_TEST_BINARY_DIR}/TestDependencyPrereq-built.txt") | |
| if(NOT EXISTS "${prereq_file}") | |
| message(FATAL_ERROR | |
| "Expected TestDependencyPrereq-built.txt to be generated by DEPENDS target.") | |
| endif() | |
| set(file_dep_file "${RunCMake_TEST_BINARY_DIR}/TestDependencyFile-built.txt") | |
| if(NOT EXISTS "${file_dep_file}") | |
| message(FATAL_ERROR | |
| "Expected TestDependencyFile-built.txt to be generated by DEPENDS file.") | |
| endif() | |
| set(subdir_prereq_file | |
| "${RunCMake_TEST_BINARY_DIR}/TestDependencySubdir/TestDependencySubdirPrereq-built.txt") | |
| if(NOT EXISTS "${subdir_prereq_file}") | |
| message(FATAL_ERROR | |
| "Expected TestDependencySubdirPrereq-built.txt to be generated by duplicate test DEPENDS target.") | |
| endif() | |
| set(subdir_file_dep_file | |
| "${RunCMake_TEST_BINARY_DIR}/TestDependencySubdir/TestDependencySubdirFile-built.txt") | |
| if(NOT EXISTS "${subdir_file_dep_file}") | |
| message(FATAL_ERROR | |
| "Expected TestDependencySubdirFile-built.txt to be generated by duplicate test DEPENDS file.") | |
| endif() |