[cmake-developers] [PATCH v3 0/2] Add continue keyword
Gregor Jasny
gjasny at googlemail.com
Sat Nov 15 06:36:31 EST 2014
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)
More information about the cmake-developers
mailing list