Merge topic 'file-GLOB-empty-no-crash'

2bba0bfc file: Fix crash on GLOB with no expressions after LIST_DIRECTORIES
This commit is contained in:
Brad King
2017-01-17 09:04:53 -05:00
committed by CMake Topic Stage
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -788,7 +788,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
this->SetError("LIST_DIRECTORIES missing bool value.");
return false;
}
++i;
continue;
}
if (recurse && (*i == "FOLLOW_SYMLINKS")) {
@@ -0,0 +1 @@
file(GLOB CONTENT_LIST LIST_DIRECTORIES false)
+1
View File
@@ -31,6 +31,7 @@ run_cmake(GLOB_RECURSE)
run_cmake(GLOB-error-LIST_DIRECTORIES-not-boolean)
# test is valid both for GLOB and GLOB_RECURSE
run_cmake(GLOB-error-LIST_DIRECTORIES-no-arg)
run_cmake(GLOB-noexp-LIST_DIRECTORIES)
if(NOT WIN32 OR CYGWIN)
run_cmake(GLOB_RECURSE-cyclic-recursion)