summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake
blob: 8efe50842665e90ec9a6c3aafa9a624f3c1e951d (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
function (check_for_bmi prefix destination name)
  set(found 0)
  foreach (ext IN ITEMS gcm)
    if (EXISTS "${prefix}/${destination}/${name}.${ext}")
      set(found 1)
      break ()
    endif ()
  endforeach ()

  if (NOT found)
    message(SEND_ERROR
      "Failed to find the ${name} BMI")
  endif ()
endfunction ()

function (check_for_interface prefix destination subdir name)
  set(found 0)
  if (NOT EXISTS "${prefix}/${destination}/${subdir}/${name}")
    message(SEND_ERROR
      "Failed to find the ${name} module interface")
  endif ()
endfunction ()

function (report_dirs prefix destination)
  message("prefix: ${prefix}")
  message("destination: ${destination}")
endfunction ()