Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Tests / RunCMake / CXXModules / examples / cxx-modules-find-bmi.cmake
1 function (check_for_bmi prefix destination name)
2   set(found 0)
3   foreach (ext IN ITEMS gcm ifc)
4     if (EXISTS "${prefix}/${destination}/${name}.${ext}")
5       set(found 1)
6       break ()
7     endif ()
8   endforeach ()
9
10   if (NOT found)
11     message(SEND_ERROR
12       "Failed to find the ${name} BMI")
13   endif ()
14 endfunction ()
15
16 function (check_for_interface prefix destination subdir name)
17   set(found 0)
18   if (NOT EXISTS "${prefix}/${destination}/${subdir}/${name}")
19     message(SEND_ERROR
20       "Failed to find the ${name} module interface")
21   endif ()
22 endfunction ()
23
24 function (report_dirs prefix destination)
25   message("prefix: ${prefix}")
26   message("destination: ${destination}")
27 endfunction ()