cxx-modules-find-bmi-and-interfaces.cmake 564 B

12345678910111213141516171819202122
  1. function (check_for_bmi prefix destination name)
  2. set(found 0)
  3. foreach (ext IN ITEMS gcm)
  4. if (EXISTS "${prefix}/${destination}/${name}.${ext}")
  5. set(found 1)
  6. break ()
  7. endif ()
  8. endforeach ()
  9. if (NOT found)
  10. message(SEND_ERROR
  11. "Failed to find the ${name} BMI")
  12. endif ()
  13. endfunction ()
  14. function (check_for_interface prefix destination subdir name)
  15. set(found 0)
  16. if (NOT EXISTS "${prefix}/${destination}/${subdir}/${name}")
  17. message(SEND_ERROR
  18. "Failed to find the ${name} module interface")
  19. endif ()
  20. endfunction ()