diff options
author | Brad King <brad.king@kitware.com> | 2015-05-08 13:18:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-08 13:20:43 (GMT) |
commit | dcb188363d5faba80664c17e9a4713bbd5c0b372 (patch) | |
tree | 5403af400e5061d43e843a59b056b2332ab98b28 /Modules | |
parent | 4566850bdd48c53997c5aea4489d5949c7d26b0b (diff) | |
download | CMake-dcb188363d5faba80664c17e9a4713bbd5c0b372.zip CMake-dcb188363d5faba80664c17e9a4713bbd5c0b372.tar.gz CMake-dcb188363d5faba80664c17e9a4713bbd5c0b372.tar.bz2 |
ExternalProject: Improve error when SOURCE_DIR is missing (#15560)
Mention the SOURCE_DIR that we checked and found empty or missing
so that the user can see the full path to what we expected to find.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 97bebc0..7cf9d79 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1866,7 +1866,18 @@ function(_ep_add_download_command name) else() _ep_is_dir_empty("${source_dir}" empty) if(${empty}) - message(SEND_ERROR "error: no download info for '${name}' -- please specify existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND") + message(SEND_ERROR + "No download info given for '${name}' and its source directory:\n" + " ${source_dir}\n" + "is not an existing non-empty directory. Please specify one of:\n" + " * SOURCE_DIR with an existing non-empty directory\n" + " * URL\n" + " * GIT_REPOSITORY\n" + " * HG_REPOSITORY\n" + " * CVS_REPOSITORY and CVS_MODULE\n" + " * SVN_REVISION\n" + " * DOWNLOAD_COMMAND" + ) endif() endif() |