Hello,

the current version now properly checks for proper nesting
of the continue keyword. To detect new scope blocks like
for example a function() I hoked into the Push/PopScope
functions.

I have two questions:
1) The Scope variable stack is held in a 'internal' structure
  that gets special treatment in the cmMakefile copy ctor.
  I don't know the implications of storing my loop block
  counter stack directly as member of cmMakefile. Could you
  please advise?

2) The error message for an inproperly nested continue looks
  like this:

  continue A CONTINUE command was found outside of a proper FOREACH or WHILE
  loop scope.

  where is the continue coming from? Is it part of a (too short)
  call stack trace? Also I noticed that the CMakeFile is still
  processed after the error is shown. Is this desired behavior?

Thanks,
Gregor

Gregor Jasny (2):
  Add continue keyword (#14013)
  Reject continue() without loop block (#14013)

 Help/command/continue.rst                          |  7 +++
 Source/cmBootstrapCommands1.cxx                    |  2 +
 Source/cmContinueCommand.cxx                       | 28 +++++++++++
 Source/cmContinueCommand.h                         | 55 ++++++++++++++++++++++
 Source/cmExecutionStatus.h                         |  7 +++
 Source/cmForEachCommand.cxx                        |  8 ++++
 Source/cmIfCommand.cxx                             |  5 ++
 Source/cmMakefile.cxx                              | 47 ++++++++++++++++++
 Source/cmMakefile.h                                | 12 +++++
 Source/cmWhileCommand.cxx                          |  7 +++
 Tests/RunCMake/CMakeLists.txt                      |  1 +
 Tests/RunCMake/continue/CMakeLists.txt             |  3 ++
 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 ++++
 .../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         |  7 +++
 25 files changed, 251 insertions(+)
 create mode 100644 Help/command/continue.rst
 create mode 100644 Source/cmContinueCommand.cxx
 create mode 100644 Source/cmContinueCommand.h
 create mode 100644 Tests/RunCMake/continue/CMakeLists.txt
 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/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

-- 
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

Reply via email to