Commit Graph

15 Commits

Author SHA1 Message Date
Eric NOULARD 1629615a10 CPack Documentation extraction from CMake script begins to work
- Enhance extract doc parser. Seems robust now. The legacy
   module documentation parser works as before ignoring
   the new markup.

 - Proof of concept for CPack (generic), CPack RPM and CPack Deb
   generator for macro and variables.
   Try cpack --help-command and cpack --help-variables
2012-01-22 13:31:24 +01:00
Ben Boeckel f231ce5ce3 Remove old false positive avoidance code
From email explaining existence in the first place:

    This is from before when the used checks throwing false
    positives about unused due to changing the definition without
    checking whether it *had* a value to begin with and me not
    realizing they were false positives. I was thinking that it was
    warning from ARGC et. al. not being used since the previous
    macro or function call and the new value warning about
    overwriting the old value.
2010-09-17 10:02:15 -04:00
Ben Boeckel e01e40cb87 Mark ARGC, ARGV*, and ARGN as used 2010-09-15 11:35:50 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 3028ca756c ENH: Better policies for functions and macros
This teaches functions and macros to use policies recorded at creation
time when they are invoked.  It restores the policies as a weak policy
stack entry so that any policies set by a function escape to its caller
as before.
2009-01-22 13:16:47 -05:00
Brad King 919fdb7f27 ENH: Enforce logical blocks in functions/macros
This teaches function() and macro() to enforce matching logical blocks
inside the recorded bodies.  This makes the error message more specific.
2009-01-21 09:49:31 -05:00
Brad King 1dcc5b4558 ENH: Better handling of mismatched blocks
If a logical block terminates with mismatching arguments we previously
failed to remove the function blocker but replayed the commands anyway,
which led to cases in which we failed to report the mismatch (return
shortly after the ending command).  The recent refactoring of function
blocker deletion changed this behavior to produce an error on the ending
line by not blocking the command.  Furthermore, the function blocker
would stay in place and complain at the end of every equal-level block
of the same type.

This teaches CMake to treat the begin/end commands (if/endif, etc.) as
correct and just warns when the arguments mismatch.  The change allows
cases in which CMake 2.6.2 silently ignored a mismatch to run as before
but with a warning.
2009-01-21 09:49:00 -05:00
Brad King bca1026250 ENH: Better error message for unclosed blocks
This centralizes construction of the error message for an unclosed
logical block (if, foreach, etc.).  We record the line at which each
block is opened so it can be reported in the error message.
2009-01-21 09:48:20 -05:00
Brad King 9551cafd69 BUG: Pop a function scope even on error
This uses an automatic variable to push and pop variable scope inside a
function call.  Previously if the function failed its scope would not be
popped.  This approach guarantees a balanced push/pop.
2009-01-14 15:14:06 -05:00
Brad King 680104a490 ENH: New format for warning and error messages
- Add cmMakefile methods IssueError and IssueWarning
  - Maintain an explicit call stack in cmMakefile
  - Include context/call-stack info in messages
  - Nested errors now unwind the call stack
  - Use new mechanism for policy warnings and errors
  - Improve policy error message
  - Include cmExecutionStatus pointer in call stack
    so that errors deeper in the C++ stack under
    a command invocation will become errors for the
    command
2008-03-07 08:40:36 -05:00
Bill Hoffman f386c2aae0 ENH: make CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS the default and remove the property. If any value is specified in an endif, endforeach, endwhile, etc then make sure it matches the start string. If no values are given then it is no longer an error. 2008-02-29 12:18:11 -05:00
Ken Martin 0e69d38004 ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class 2008-01-23 10:28:26 -05:00
Ken Martin f69a6a7c8c BUG: fix issue with CMAKE_CURENT_LIST_FILE reporting in funcitons 2007-12-20 10:05:08 -05:00
Ken Martin ab7f11a239 COMP: fix style and work around old compilers 2007-12-04 10:43:33 -05:00
Ken Martin 951444165f ENH: add functions and raise scope to cmake 2007-12-03 12:44:42 -05:00