[cmake-developers] [PATCH v2 0/2] Support for continue command

Brad King brad.king at kitware.com
Thu Nov 6 15:43:04 EST 2014


On 11/06/2014 03:20 PM, Gregor Jasny wrote:
> As you can see in the patch the if command detects the continue
> invocation and aborts looping over the collected commands.

Right.

> IMHO what's needed is a in loop counter that counts how deep we are in a
> loop construct. It gets incremented within every foreach or while loop.
> Decremented with each endforeach or endwhile.

Take a look at uses of LexicalPushPop, ScopePushPop, and PolicyPushPop.
Something similar may work for maintaining a loop nesting count.

Thanks,
-Brad



More information about the cmake-developers mailing list