Hello, Changes compared to v4: * Use new style error reporting in cmContinueCommand.cxx * Reject any given arguments to continue() * CMP0055: Reject any arguments to break, too.
I put both checks: the loop block check and the empty arguments check into the same policy. Please drop me a note if you want to have an extra policy per check. Thanks, Gregor Gregor Jasny (4): Add continue keyword (#14013) Reject continue() without loop block (#14013) Reject continue with arguments (#14013) Strict checks for break() command Help/command/continue.rst | 7 +++ Help/manual/cmake-policies.7.rst | 1 + Help/policy/CMP0055.rst | 17 ++++++ Source/cmBootstrapCommands1.cxx | 2 + Source/cmBreakCommand.cxx | 68 +++++++++++++++++++++- Source/cmContinueCommand.cxx | 40 +++++++++++++ Source/cmContinueCommand.h | 55 +++++++++++++++++ Source/cmExecutionStatus.h | 7 +++ Source/cmForEachCommand.cxx | 12 ++++ Source/cmIfCommand.cxx | 5 ++ Source/cmMakefile.cxx | 48 +++++++++++++++ Source/cmMakefile.h | 21 +++++++ Source/cmPolicies.cxx | 5 ++ Source/cmPolicies.h | 1 + Source/cmWhileCommand.cxx | 8 +++ .../CMP0055/CMP0055-NEW-Out-of-Scope-result.txt | 1 + .../CMP0055/CMP0055-NEW-Out-of-Scope-stderr.txt | 4 ++ .../CMP0055/CMP0055-NEW-Out-of-Scope.cmake | 4 ++ .../CMP0055-NEW-Reject-Arguments-result.txt | 1 + .../CMP0055-NEW-Reject-Arguments-stderr.txt | 4 ++ .../CMP0055/CMP0055-NEW-Reject-Arguments.cmake | 6 ++ .../CMP0055/CMP0055-OLD-Out-of-Scope-result.txt | 1 + .../CMP0055/CMP0055-OLD-Out-of-Scope-stderr.txt | 1 + .../CMP0055/CMP0055-OLD-Out-of-Scope.cmake | 4 ++ .../CMP0055-OLD-Reject-Arguments-result.txt | 1 + .../CMP0055-OLD-Reject-Arguments-stderr.txt | 1 + .../CMP0055/CMP0055-OLD-Reject-Arguments.cmake | 6 ++ .../CMP0055/CMP0055-WARN-Out-of-Scope-result.txt | 1 + .../CMP0055/CMP0055-WARN-Out-of-Scope-stderr.txt | 9 +++ .../CMP0055/CMP0055-WARN-Out-of-Scope.cmake | 2 + .../CMP0055-WARN-Reject-Arguments-result.txt | 1 + .../CMP0055-WARN-Reject-Arguments-stderr.txt | 10 ++++ .../CMP0055/CMP0055-WARN-Reject-Arguments.cmake | 4 ++ Tests/RunCMake/CMP0055/CMakeLists.txt | 3 + Tests/RunCMake/CMP0055/RunCMakeTest.cmake | 9 +++ Tests/RunCMake/CMakeLists.txt | 3 + Tests/RunCMake/continue/CMakeLists.txt | 3 + .../RunCMake/continue/ContinueForEachInLists.cmake | 10 ++++ Tests/RunCMake/continue/ContinueForeach-stdout.txt | 4 ++ Tests/RunCMake/continue/ContinueForeach.cmake | 8 +++ .../continue/ContinueNestedForeach-stdout.txt | 6 ++ .../RunCMake/continue/ContinueNestedForeach.cmake | 13 +++++ Tests/RunCMake/continue/ContinueWhile-stdout.txt | 6 ++ Tests/RunCMake/continue/ContinueWhile.cmake | 10 ++++ .../continue/NoArgumentsToContinue-result.txt | 1 + .../continue/NoArgumentsToContinue-stderr.txt | 1 + .../RunCMake/continue/NoArgumentsToContinue.cmake | 3 + .../RunCMake/continue/NoEnclosingBlock-result.txt | 1 + .../RunCMake/continue/NoEnclosingBlock-stderr.txt | 2 + Tests/RunCMake/continue/NoEnclosingBlock.cmake | 1 + .../continue/NoEnclosingBlockInFunction-result.txt | 1 + .../continue/NoEnclosingBlockInFunction-stderr.txt | 2 + .../continue/NoEnclosingBlockInFunction.cmake | 8 +++ Tests/RunCMake/continue/RunCMakeTest.cmake | 9 +++ Tests/RunCMake/return/CMakeLists.txt | 3 + Tests/RunCMake/return/ReturnFromForeach-result.txt | 1 + Tests/RunCMake/return/ReturnFromForeach.cmake | 10 ++++ Tests/RunCMake/return/RunCMakeTest.cmake | 3 + 58 files changed, 478 insertions(+), 1 deletion(-) create mode 100644 Help/command/continue.rst create mode 100644 Help/policy/CMP0055.rst create mode 100644 Source/cmContinueCommand.cxx create mode 100644 Source/cmContinueCommand.h create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Out-of-Scope-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Out-of-Scope-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Out-of-Scope.cmake create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Reject-Arguments-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Reject-Arguments-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-NEW-Reject-Arguments.cmake create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Out-of-Scope-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Out-of-Scope-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Out-of-Scope.cmake create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Reject-Arguments-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Reject-Arguments-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-OLD-Reject-Arguments.cmake create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Out-of-Scope-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Out-of-Scope-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Out-of-Scope.cmake create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Reject-Arguments-result.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Reject-Arguments-stderr.txt create mode 100644 Tests/RunCMake/CMP0055/CMP0055-WARN-Reject-Arguments.cmake create mode 100644 Tests/RunCMake/CMP0055/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0055/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/continue/CMakeLists.txt create mode 100644 Tests/RunCMake/continue/ContinueForEachInLists.cmake create mode 100644 Tests/RunCMake/continue/ContinueForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueWhile-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueWhile.cmake create mode 100644 Tests/RunCMake/continue/NoArgumentsToContinue-result.txt create mode 100644 Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt create mode 100644 Tests/RunCMake/continue/NoArgumentsToContinue.cmake create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock-result.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock.cmake create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction-result.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake create mode 100644 Tests/RunCMake/continue/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/return/CMakeLists.txt create mode 100644 Tests/RunCMake/return/ReturnFromForeach-result.txt create mode 100644 Tests/RunCMake/return/ReturnFromForeach.cmake create mode 100644 Tests/RunCMake/return/RunCMakeTest.cmake -- 1.9.3 (Apple Git-50) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
