summaryrefslogtreecommitdiffstats
path: root/Tests/Module/ExternalData/Data1Check.cmake
blob: b99d7aea721afac7e0d07f286155b6ea1692db82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
file(STRINGS "${Data}" lines LIMIT_INPUT 1024)
if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
  message(SEND_ERROR "Input file:\n  ${Data}\ndoes not have expected content, but [[${lines}]]")
endif()
set(SeriesAn1 "1\\.dat")
set(SeriesBn1 "_1\\.dat")
set(SeriesCn1 "\\.1\\.dat")
set(SeriesDn1 "-1\\.dat")
set(SeriesAl 1 2 3)
set(SeriesBl _1 _2 _3)
set(SeriesCl .1 .2 .3)
set(SeriesDl -1 -2 -3)
foreach(s A B C D)
  foreach(n "" ${Series${s}l})
    string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}")
    if(NOT EXISTS "${file}")
      message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
    endif()
  endforeach()
endforeach()
foreach(s A B C D)
  foreach(n ${Series${s}l})
    string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}")
    if(NOT EXISTS "${file}")
      message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
    endif()
  endforeach()
endforeach()
foreach(n .1 .2 .3 .4)
  string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}")
  if(NOT EXISTS "${file}")
    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
  endif()
endforeach()
foreach(n A B)
  string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}")
  if(NOT EXISTS "${file}")
    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
  endif()
endforeach()
foreach(n Top A B C)
  string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}")
  if(NOT EXISTS "${file}")
    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
  endif()
endforeach()
foreach(n A B C)
  set(file "${Directory}/${n}.dat")
  if(NOT EXISTS "${file}")
    message(SEND_ERROR "Input file:\n  ${file}\ndoes not exist!")
  endif()
endforeach()