[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3681-ga3935db

Brad King brad.king at kitware.com
Mon Jun 9 16:25:06 EDT 2014


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  a3935db5a260943aada7f9a6f2b01f7160a992d5 (commit)
       via  b1c113d9a79c8ed78bffa63645a146593d19dadc (commit)
      from  f93a85c96a332146137defdd3cd062d7b18b0133 (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=a3935db5a260943aada7f9a6f2b01f7160a992d5
commit a3935db5a260943aada7f9a6f2b01f7160a992d5
Merge: f93a85c b1c113d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 9 16:25:05 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 9 16:25:05 2014 -0400

    Merge topic 'no-parse-directory' into next
    
    b1c113d9 cmake: Do not open directories as scripts (#14966)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1c113d9a79c8ed78bffa63645a146593d19dadc
commit b1c113d9a79c8ed78bffa63645a146593d19dadc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 9 16:19:07 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 9 16:21:11 2014 -0400

    cmake: Do not open directories as scripts (#14966)
    
    Check if a file path is a directory before opening it.  Extend the
    RunCMake.CommandLine test with a case running "cmake -P" on a directory.

diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 705666d..3fc5b69 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -142,7 +142,8 @@ bool cmListFile::ParseFile(const char* filename,
                            bool topLevel,
                            cmMakefile *mf)
 {
-  if(!cmSystemTools::FileExists(filename))
+  if(!cmSystemTools::FileExists(filename) ||
+     cmSystemTools::FileIsDirectory(filename))
     {
     return false;
     }
diff --git a/Tests/RunCMake/CommandLine/P_directory-result.txt b/Tests/RunCMake/CommandLine/P_directory-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/P_directory-stderr.txt b/Tests/RunCMake/CommandLine/P_directory-stderr.txt
new file mode 100644
index 0000000..b8319a1
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_directory-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine$
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 3aaeac0..f3d9637 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -35,3 +35,5 @@ run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep)
 run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x)
 run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1)
 run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1)
+
+run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR})

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

Summary of changes:
 Source/cmListFileCache.cxx                                          |    3 ++-
 .../CMP0004-NEW-result.txt => CommandLine/P_directory-result.txt}   |    0
 Tests/RunCMake/CommandLine/P_directory-stderr.txt                   |    1 +
 Tests/RunCMake/CommandLine/RunCMakeTest.cmake                       |    2 ++
 4 files changed, 5 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/P_directory-result.txt} (100%)
 create mode 100644 Tests/RunCMake/CommandLine/P_directory-stderr.txt


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list