| file(READ "${RunCMake_TEST_BINARY_DIR}/build.ninja" build_ninja) | |
| foreach(line IN ITEMS | |
| "command\\.h[^\n]*: CUSTOM_COMMAND \\|\\| cmake_custom_command_order_depends_target_top\\$:static\n" | |
| "build cmake_custom_command_order_depends_target_top\\$:static: phony \\|\\| cmake_custom_command_order_depends_target_mid\\$:static [^\n]*mid[^\n]*\n" | |
| "build cmake_custom_command_order_depends_target_mid\\$:static: phony \\|\\| [^\n]*dep1[^\n]* [^\n]*dep2[^\n]*\n" | |
| ) | |
| if(NOT build_ninja MATCHES "${line}") | |
| string(APPEND RunCMake_TEST_FAILED "build.ninja does not match:\n ${line}\n") | |
| endif() | |
| endforeach() | |
| if(build_ninja MATCHES "build cmake_custom_command_order_depends_target_top\\$:static: [^\n]*dep1") | |
| string(APPEND RunCMake_TEST_FAILED "cmake_custom_command_order_depends_target_top\\$:static lists dep1, which mid already covers.\n") | |
| endif() |