From 298760661f30faf2014f609506f15ff2d3489ddf Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 22 Apr 2021 13:06:11 -0400 Subject: ExternalData: Improve error message when we fail to create a file Report the underlying system error. --- Modules/ExternalData.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index 1850e74..189374b 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -949,7 +949,7 @@ function(_ExternalData_link_or_copy src dst) endif() if(result) file(REMOVE "${tmp}") - message(FATAL_ERROR "Failed to create\n ${tmp}\nfrom\n ${obj}") + message(FATAL_ERROR "Failed to create:\n \"${tmp}\"\nfrom:\n \"${obj}\"\nwith error:\n ${result}") endif() # Atomically create/replace the real destination. -- cgit v0.12