diff options
Diffstat (limited to 'Tests/RunCMake/FetchContent/FindDependencyExportDP.cmake')
-rw-r--r-- | Tests/RunCMake/FetchContent/FindDependencyExportDP.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/FetchContent/FindDependencyExportDP.cmake b/Tests/RunCMake/FetchContent/FindDependencyExportDP.cmake new file mode 100644 index 0000000..7cabe51 --- /dev/null +++ b/Tests/RunCMake/FetchContent/FindDependencyExportDP.cmake @@ -0,0 +1,11 @@ +function(fde_provide_dependency method name) + if(NOT CMAKE_EXPORT_FIND_PACKAGE_NAME STREQUAL _expected_export_find_package_name_dp) + message(FATAL_ERROR "Expected value of CMAKE_EXPORT_FIND_PACKAGE_NAME:\n ${_expected_export_find_package_name_dp}\nActual value:\n ${CMAKE_EXPORT_FIND_PACKAGE_NAME}") + endif() + + set(dp_called TRUE PARENT_SCOPE) +endfunction() + +cmake_language(SET_DEPENDENCY_PROVIDER fde_provide_dependency + SUPPORTED_METHODS FETCHCONTENT_MAKEAVAILABLE_SERIAL + ) |