summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake
blob: 0ee4a82e942ada7bacbf50827b43eaa8365d5f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
foreach(f
    "${RunCMake_TEST_BINARY_DIR}/relative-input-WARN.txt"
    "${RunCMake_TEST_BINARY_DIR}/relative-output-WARN.txt"
    )
  if(EXISTS "${f}")
    file(READ "${f}" content)
    if(NOT content MATCHES "^relative-input-WARN[\r\n]*$")
      string(APPEND RunCMake_TEST_FAILED "File\n  ${f}\n" "does not have expected content.\n")
    endif()
  else()
    string(APPEND RunCMake_TEST_FAILED "Missing\n  ${f}\n")
  endif()
endforeach()