On 11/17/2014 02:00 PM, Gregor Jasny wrote:
> the current version now properly checks for proper nesting
> of the continue keyword.

Cool, thanks.

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

IIRC the cmMakefile copy ctor is used in CPack, but only in a
context where nothing but the top-level scope is in place.
You should be able to store the member in cmMakefile.

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

It comes from use of SetError and "return false", the old error
reporting mechanism.  Instead you can do:

  this->Makefile->IssueMessage(cmake::FATAL_ERROR, ...);
  cmSystemTools::SetFatalErrorOccured();
  return true;

> 3) The continue tests have a requirement for CMake version 3.1
>   in the CMakeLists.txt file. This needs to be bumped to 3.2 once
>   the the version number got incremented to 3.2.

You can use a dated version like 3.1.20141117 to request a dev
version.

> 4) Is the new policy to reject misplaced break() commands really
>   necessary?

Yes, we need old code to continue to work even if it is wrong in
this regard.

Thanks,
-Brad

-- 

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