summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-12 13:12:43 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-05-12 13:12:43 (GMT)
commit55fe56444f134e676a0b9a54d72dbdb85b573a49 (patch)
tree7f51a6bfeee921e744e1b6dc1a9389879eadc1e2 /Tests
parentcca3bbde98de7954ebd3bca1966c92d931fe0dab (diff)
parentdcb188363d5faba80664c17e9a4713bbd5c0b372 (diff)
downloadCMake-55fe56444f134e676a0b9a54d72dbdb85b573a49.zip
CMake-55fe56444f134e676a0b9a54d72dbdb85b573a49.tar.gz
CMake-55fe56444f134e676a0b9a54d72dbdb85b573a49.tar.bz2
Merge topic 'ExternalProject-improve-missing-source-error'
dcb18836 ExternalProject: Improve error when SOURCE_DIR is missing (#15560)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ExternalProject/NoOptions-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/NoOptions-stderr.txt18
-rw-r--r--Tests/RunCMake/ExternalProject/NoOptions.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/ExternalProject/SourceEmpty-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt18
-rw-r--r--Tests/RunCMake/ExternalProject/SourceEmpty.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/SourceMissing-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt18
-rw-r--r--Tests/RunCMake/ExternalProject/SourceMissing.cmake2
10 files changed, 69 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/NoOptions-result.txt b/Tests/RunCMake/ExternalProject/NoOptions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NoOptions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
new file mode 100644
index 0000000..12a76c5
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
@@ -0,0 +1,18 @@
+^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\)$
diff --git a/Tests/RunCMake/ExternalProject/NoOptions.cmake b/Tests/RunCMake/ExternalProject/NoOptions.cmake
new file mode 100644
index 0000000..7613c15
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/NoOptions.cmake
@@ -0,0 +1,2 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj)
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index a82ffc9..e038409 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -1,5 +1,8 @@
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)
diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
new file mode 100644
index 0000000..58a343c
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
@@ -0,0 +1,18 @@
+^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\)$
diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty.cmake b/Tests/RunCMake/ExternalProject/SourceEmpty.cmake
new file mode 100644
index 0000000..db746e9
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceEmpty.cmake
@@ -0,0 +1,5 @@
+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}")
diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-result.txt b/Tests/RunCMake/ExternalProject/SourceMissing-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceMissing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
new file mode 100644
index 0000000..e62f7cf
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
@@ -0,0 +1,18 @@
+^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\)$
diff --git a/Tests/RunCMake/ExternalProject/SourceMissing.cmake b/Tests/RunCMake/ExternalProject/SourceMissing.cmake
new file mode 100644
index 0000000..8f369d4
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceMissing.cmake
@@ -0,0 +1,2 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj SOURCE_DIR SourceMissing)