[Cmake-commits] CMake branch, next, updated. v3.2.2-2633-ge2723d5

Brad King brad.king at kitware.com
Fri May 8 09:34:29 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e2723d54d7bb740a1e7dc298b61348c4420f2bce (commit)
       via  dcb188363d5faba80664c17e9a4713bbd5c0b372 (commit)
      from  7ca1bb2935a32a6cbed91ecca271e40e975b8761 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2723d54d7bb740a1e7dc298b61348c4420f2bce
commit e2723d54d7bb740a1e7dc298b61348c4420f2bce
Merge: 7ca1bb2 dcb1883
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 8 09:34:28 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 8 09:34:28 2015 -0400

    Merge topic 'ExternalProject-improve-missing-source-error' into next
    
    dcb18836 ExternalProject: Improve error when SOURCE_DIR is missing (#15560)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcb188363d5faba80664c17e9a4713bbd5c0b372
commit dcb188363d5faba80664c17e9a4713bbd5c0b372
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 8 09:18:50 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri May 8 09:20:43 2015 -0400

    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.

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()
 
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..12a76c5d
--- /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)

-----------------------------------------------------------------------

Summary of changes:
 Modules/ExternalProject.cmake                        |   13 ++++++++++++-
 .../NoOptions-result.txt}                            |    0
 Tests/RunCMake/ExternalProject/NoOptions-stderr.txt  |   18 ++++++++++++++++++
 Tests/RunCMake/ExternalProject/NoOptions.cmake       |    2 ++
 Tests/RunCMake/ExternalProject/RunCMakeTest.cmake    |    3 +++
 .../SourceEmpty-result.txt}                          |    0
 .../RunCMake/ExternalProject/SourceEmpty-stderr.txt  |   18 ++++++++++++++++++
 Tests/RunCMake/ExternalProject/SourceEmpty.cmake     |    5 +++++
 .../SourceMissing-result.txt}                        |    0
 .../ExternalProject/SourceMissing-stderr.txt         |   18 ++++++++++++++++++
 Tests/RunCMake/ExternalProject/SourceMissing.cmake   |    2 ++
 11 files changed, 78 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => ExternalProject/NoOptions-result.txt} (100%)
 create mode 100644 Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
 create mode 100644 Tests/RunCMake/ExternalProject/NoOptions.cmake
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => ExternalProject/SourceEmpty-result.txt} (100%)
 create mode 100644 Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
 create mode 100644 Tests/RunCMake/ExternalProject/SourceEmpty.cmake
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => ExternalProject/SourceMissing-result.txt} (100%)
 create mode 100644 Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
 create mode 100644 Tests/RunCMake/ExternalProject/SourceMissing.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list