diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-15 21:14:43 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-07-06 15:38:11 (GMT) |
commit | 4d55f1422efe804a74e08e5f2a362077a0a9b938 (patch) | |
tree | 003922a722e8c89888da36a57330d408f05f872b /Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake | |
parent | eff45f790daf0beb3441961678f40599caf7eded (diff) | |
download | CMake-4d55f1422efe804a74e08e5f2a362077a0a9b938.zip CMake-4d55f1422efe804a74e08e5f2a362077a0a9b938.tar.gz CMake-4d55f1422efe804a74e08e5f2a362077a0a9b938.tar.bz2 |
RunCMake/CXXModules: test installation of BMIs and interfaces
Diffstat (limited to 'Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake')
-rw-r--r-- | Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake b/Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake new file mode 100644 index 0000000..8efe508 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/cxx-modules-find-bmi.cmake @@ -0,0 +1,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 () |