diff options
Diffstat (limited to 'Tests/RunCMake/FPHSA/FindCustomMessage.cmake')
-rw-r--r-- | Tests/RunCMake/FPHSA/FindCustomMessage.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/FPHSA/FindCustomMessage.cmake b/Tests/RunCMake/FPHSA/FindCustomMessage.cmake new file mode 100644 index 0000000..4d67db8 --- /dev/null +++ b/Tests/RunCMake/FPHSA/FindCustomMessage.cmake @@ -0,0 +1,17 @@ +# pseudo find_module + +if (REASON_FAILURE_MESSAGE) + list (PREPEND REASON_FAILURE_MESSAGE "REASON_FAILURE_MESSAGE") +endif() + +include(FindPackageHandleStandardArgs) + +if (CONFIG_MODE) + find_package (CustomMessage QUIET CONFIG HINTS "${CMAKE_MODULE_PATH}") + find_package_handle_standard_args(CustomMessage CONFIG_MODE + ${REASON_FAILURE_MESSAGE}) +else() + find_package_handle_standard_args(CustomMessage REQUIRED_VARS FOOBAR + VERSION_VAR CustomMessage_VERSION + ${REASON_FAILURE_MESSAGE}) +endif() |