Merge topic 'no-parse-directory'

b1c113d9 cmake: Do not open directories as scripts (#14966)
This commit is contained in:
Brad King 2014-06-10 09:17:41 -04:00 committed by CMake Topic Stage
commit e0471ae2f9
4 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine$

View File

@ -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})