diff options
author | Brad King <brad.king@kitware.com> | 2018-06-25 13:53:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-06-25 13:53:24 (GMT) |
commit | 383f29fd63e98e574606150c5f717d3298f4d5c9 (patch) | |
tree | 512765e4f712124b1161fa90d70fe1f3c08a9df6 /Source | |
parent | 8e50de4dc5c06a7a2279bc162a59e6e8ba9ca4fa (diff) | |
parent | 142a6257294afbfdf86ec13fdb4ecf303b131f99 (diff) | |
download | CMake-383f29fd63e98e574606150c5f717d3298f4d5c9.zip CMake-383f29fd63e98e574606150c5f717d3298f4d5c9.tar.gz CMake-383f29fd63e98e574606150c5f717d3298f4d5c9.tar.bz2 |
Merge topic 'file-GLOB-remove-new-errors'
142a625729 file: Drop error cases added by CMake 3.12.0-rc1 to avoid regressions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Shane Parris <shane.lee.parris@gmail.com>
Merge-request: !2164
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aae70b1..dcb79f7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -777,7 +777,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args, this->Makefile->GetCMakeInstance()->GetWorkingMode(); while (i != args.end()) { if (*i == "LIST_DIRECTORIES") { - ++i; + ++i; // skip LIST_DIRECTORIES if (i != args.end()) { if (cmSystemTools::IsOn(i->c_str())) { g.SetListDirs(true); @@ -789,27 +789,21 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args, this->SetError("LIST_DIRECTORIES missing bool value."); return false; } + ++i; } else { this->SetError("LIST_DIRECTORIES missing bool value."); return false; } - ++i; - if (i == args.end()) { - this->SetError("GLOB requires a glob expression after the bool."); - return false; - } } else if (*i == "FOLLOW_SYMLINKS") { - if (!recurse) { - this->SetError("FOLLOW_SYMLINKS is not a valid parameter for GLOB."); - return false; - } - explicitFollowSymlinks = true; - g.RecurseThroughSymlinksOn(); - ++i; - if (i == args.end()) { - this->SetError( - "GLOB_RECURSE requires a glob expression after FOLLOW_SYMLINKS."); - return false; + ++i; // skip FOLLOW_SYMLINKS + if (recurse) { + explicitFollowSymlinks = true; + g.RecurseThroughSymlinksOn(); + if (i == args.end()) { + this->SetError( + "GLOB_RECURSE requires a glob expression after FOLLOW_SYMLINKS."); + return false; + } } } else if (*i == "RELATIVE") { ++i; // skip RELATIVE |