Commit 55fe5644 authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'ExternalProject-improve-missing-source-error'

dcb18836 ExternalProject: Improve error when SOURCE_DIR is missing (#15560)
parents cca3bbde dcb18836
......@@ -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()
......
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
No download info given for 'MyProj' and its source directory:
.*/Tests/RunCMake/ExternalProject/NoOptions-build/MyProj-prefix/src/MyProj
is not an existing non-empty directory. Please specify one of:
\* SOURCE_DIR with an existing non-empty directory
\* URL
\* GIT_REPOSITORY
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
\* SVN_REVISION
\* DOWNLOAD_COMMAND
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
NoOptions.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
include(ExternalProject)
ExternalProject_Add(MyProj)
include(RunCMake)
run_cmake(NoOptions)
run_cmake(SourceEmpty)
run_cmake(SourceMissing)
run_cmake(CMAKE_CACHE_ARGS)
run_cmake(CMAKE_CACHE_DEFAULT_ARGS)
run_cmake(CMAKE_CACHE_mix)
......
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
No download info given for 'MyProj' and its source directory:
.*/Tests/RunCMake/ExternalProject/SourceEmpty-build/SourceEmpty
is not an existing non-empty directory. Please specify one of:
\* SOURCE_DIR with an existing non-empty directory
\* URL
\* GIT_REPOSITORY
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
\* SVN_REVISION
\* DOWNLOAD_COMMAND
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
SourceEmpty.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
include(ExternalProject)
set(source_dir "${CMAKE_CURRENT_BINARY_DIR}/SourceEmpty")
file(REMOVE_RECURSE "${source_dir}")
file(MAKE_DIRECTORY "${source_dir}")
ExternalProject_Add(MyProj SOURCE_DIR "${source_dir}")
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
No download info given for 'MyProj' and its source directory:
.*/Tests/RunCMake/ExternalProject/SourceMissing-build/SourceMissing
is not an existing non-empty directory. Please specify one of:
\* SOURCE_DIR with an existing non-empty directory
\* URL
\* GIT_REPOSITORY
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
\* SVN_REVISION
\* DOWNLOAD_COMMAND
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
SourceMissing.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
include(ExternalProject)
ExternalProject_Add(MyProj SOURCE_DIR SourceMissing)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment