[Cmake-commits] CMake branch, next, updated. v3.4.1-1663-gf447ad4
Brad King
brad.king at kitware.com
Thu Dec 10 09:08:29 EST 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 f447ad40b4a155f3501354857aaaaaa6cfb36d52 (commit)
via 7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 (commit)
via 4ce6fbc76b0ebaeef258695c2b876061b5b61073 (commit)
from 11039e0002bd03eccaee930d308b1afd5dcf3a9b (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f447ad40b4a155f3501354857aaaaaa6cfb36d52
commit f447ad40b4a155f3501354857aaaaaa6cfb36d52
Merge: 11039e0 7984ac5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 10 09:08:27 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 10 09:08:27 2015 -0500
Merge topic 'cmake-E-multiple-inputs' into next
7984ac5e cmake: Teach -E make_directory to support multiple input directories
4ce6fbc7 Help: Rename release notes for topic 'cmake-E-multiple-inputs'
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7984ac5e58722295e71f6c2418e2a54d6f1a0cc1
commit 7984ac5e58722295e71f6c2418e2a54d6f1a0cc1
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
AuthorDate: Wed Dec 9 15:59:43 2015 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 10 09:07:38 2015 -0500
cmake: Teach -E make_directory to support multiple input directories
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 4cbe976..91af3e3 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -167,7 +167,8 @@ Available commands are:
Change the current working directory and run a command.
``compare_files <file1> <file2>``
- Check if file1 is same as file2.
+ Check if ``<file1>`` is same as ``<file2>``. If files are the same,
+ then returns 0, if not itreturns 1.
``copy <file>... <destination>``
Copy files to ``<destination>`` (either file or directory).
@@ -194,10 +195,11 @@ Available commands are:
Run command in a modified environment.
``environment``
- Display the current environment.
+ Display the current environment variables.
-``make_directory <dir>``
- Create a directory.
+``make_directory <dir>...``
+ Create ``<dir>`` directories. If necessary, create parent
+ directories too.
``md5sum <file>...``
Compute md5sum of files.
diff --git a/Help/release/dev/cmake-E-multiple-inputs.rst b/Help/release/dev/cmake-E-multiple-inputs.rst
index aa52a98..480261d 100644
--- a/Help/release/dev/cmake-E-multiple-inputs.rst
+++ b/Help/release/dev/cmake-E-multiple-inputs.rst
@@ -6,3 +6,6 @@ cmake-E-multiple-inputs
* The :manual:`cmake(1)` ``-E copy_directory`` command-line
tool learned to support copying multiple input directories to a directory.
+
+* The :manual:`cmake(1)` ``-E make_directory`` command-line
+ tool learned to support copying multiple input directories to a directory.
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 6a4234f..fb7b1f5 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -68,7 +68,7 @@ void CMakeCommandUsage(const char* program)
<< " env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...\n"
<< " - run command in a modified environment\n"
<< " environment - display the current environment\n"
- << " make_directory dir - create a directory\n"
+ << " make_directory <dir>... - create parent and <dir> directories\n"
<< " md5sum <file>... - compute md5sum of files\n"
<< " remove [-f] <file>... - remove the file(s), use -f to force "
"it\n"
@@ -447,15 +447,20 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
}
#endif
- else if (args[1] == "make_directory" && args.size() == 3)
+ else if (args[1] == "make_directory" && args.size() > 2)
{
- if(!cmSystemTools::MakeDirectory(args[2].c_str()))
+ // If error occurs we want to continue copying next files.
+ bool return_value = 0;
+ for (std::string::size_type cc = 2; cc < args.size(); cc ++)
{
- std::cerr << "Error making directory \"" << args[2]
- << "\".\n";
- return 1;
+ if(!cmSystemTools::MakeDirectory(args[cc].c_str()))
+ {
+ std::cerr << "Error creating directory \""
+ << args[cc] << "\".\n";
+ return_value = 1;
+ }
}
- return 0;
+ return return_value;
}
else if (args[1] == "remove_directory" && args.size() == 3)
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
new file mode 100644
index 0000000..08a9428
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
@@ -0,0 +1 @@
+^Error creating directory .*file_for_test.txt\".$
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 57036ba..5e2200f 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -140,6 +140,20 @@ unset(in)
unset(out)
unset(outfile)
+set(out ${RunCMake_BINARY_DIR}/make_directory_output)
+set(outfile ${out}/file_for_test.txt)
+file(REMOVE_RECURSE "${out}")
+file(MAKE_DIRECTORY ${out})
+file(WRITE ${outfile} "")
+run_cmake_command(E_make_directory-three-directories
+ ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${out}/d2)
+run_cmake_command(E_make_directory-directory-with-parent
+ ${CMAKE_COMMAND} -E make_directory ${out}/parent/child)
+run_cmake_command(E_make_directory-three-directories-and-file
+ ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile})
+unset(out)
+unset(outfile)
+
run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env)
run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce6fbc76b0ebaeef258695c2b876061b5b61073
commit 4ce6fbc76b0ebaeef258695c2b876061b5b61073
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 10 08:52:20 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 10 08:52:20 2015 -0500
Help: Rename release notes for topic 'cmake-E-multiple-inputs'
This topic name will supersede cmake-E-copy-multiple-inputs.
diff --git a/Help/release/dev/cmake-E-copy-multiple-inputs.rst b/Help/release/dev/cmake-E-multiple-inputs.rst
similarity index 83%
rename from Help/release/dev/cmake-E-copy-multiple-inputs.rst
rename to Help/release/dev/cmake-E-multiple-inputs.rst
index eeb1fab..aa52a98 100644
--- a/Help/release/dev/cmake-E-copy-multiple-inputs.rst
+++ b/Help/release/dev/cmake-E-multiple-inputs.rst
@@ -1,5 +1,5 @@
-cmake-E-copy-multiple-inputs
-----------------------------
+cmake-E-multiple-inputs
+-----------------------
* The :manual:`cmake(1)` ``-E copy`` and ``-E copy_if_different`` command-line
tools learned to support copying multiple input files to a directory.
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake.1.rst | 10 ++++++----
...tiple-inputs.rst => cmake-E-multiple-inputs.rst} | 7 +++++--
Source/cmcmd.cxx | 19 ++++++++++++-------
...make_directory-directory-with-parent-result.txt} | 0
..._make_directory-directory-with-parent-stderr.txt | 0
...directory-three-directories-and-file-result.txt} | 0
..._directory-three-directories-and-file-stderr.txt | 1 +
.../E_make_directory-three-directories-result.txt} | 0
.../E_make_directory-three-directories-stderr.txt | 0
Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 14 ++++++++++++++
10 files changed, 38 insertions(+), 13 deletions(-)
rename Help/release/dev/{cmake-E-copy-multiple-inputs.rst => cmake-E-multiple-inputs.rst} (60%)
copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-directory-with-parent-result.txt} (100%)
copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt (100%)
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_make_directory-three-directories-and-file-result.txt} (100%)
create mode 100644 Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-three-directories-result.txt} (100%)
copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt (100%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list