summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_build/BuildCommandFailure-check.cmake
blob: feac3ced280c214bca26fe2f10cb22dfb91d5ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml")
if(build_xml_file)
  file(READ "${build_xml_file}" build_xml LIMIT 4096)
  if(NOT build_xml MATCHES [[this command failed]])
    string(REPLACE "\n" "\n  " build_xml "  ${build_xml}")
    set(RunCMake_TEST_FAILED
      "Build.xml does not have expected error message:\n${build_xml}"
      )
  endif()
else()
  set(RunCMake_TEST_FAILED "Build.xml not found")
endif()