Commit Graph

42 Commits

Author SHA1 Message Date
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
dbd88e00c7 ENH: Improve context for errors in macros
We now properly report the source location of command arguments inside
macros instead of using the macro invocation site.  No information is
lost because full call-stack information is already reported.
2008-09-24 08:51:26 -04: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
27379d7b08 ENH: make properties a bit more formal with documentation and chaining 2006-12-07 09:45:32 -05:00
Bill Hoffman
6600143ea1 ENH: fix warning 2006-12-01 15:28:00 -05:00
Bill Hoffman
d99ee73dff BUG: fix for 3815 seg fault 2006-12-01 10:30:11 -05:00
Bill Hoffman
d5cce9f0b5 ENH: fix compile error 2006-10-03 12:09:47 -04:00
Bill Hoffman
46c6442ce2 BUG: fix for seg fault bug #3815 2006-10-03 10:57:31 -04:00
Ken Martin
c88c75b8f2 ENH: reduce string construct delete ops 2006-05-31 11:19:39 -04:00
Ken Martin
50d058a3a1 ENH: always compile progress 2006-05-23 09:11:46 -04:00
Ken Martin
47c7108111 STYLE: fix line length 2006-05-12 12:29:09 -04:00
Ken Martin
3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Andy Cedilnik
634343c3e8 STYLE: Fix some style issues 2006-03-10 13:06:26 -05:00
Ken Martin
4c00a1d1e6 ENH: revert back to string replacement version 2005-07-05 10:08:46 -04:00
Ken Martin
5c68b61a9c COMP: fix compiler warnings 2005-06-23 12:34:19 -04:00
Ken Martin
dec5cc1082 ENH: converted macro to use variables and fixed some case issues with some function blockers 2005-06-23 11:03:57 -04:00
Andy Cedilnik
24a5c0a72e ENH: Save command that macro overwrites 2005-06-14 12:48:59 -04:00
Bill Hoffman
1004073942 ENH: performance improvements 2005-04-12 13:27:07 -04:00
Ken Martin
0fe5f14c28 COMP: fix warning 2005-03-18 11:29:34 -05:00
Ken Martin
345cf04012 ENH: big change that includes immediate subdir support, removing the notion of inherited commands, makefiles no longer read in the parent makefiles but instead inherit thier parent makefiles current settings 2005-03-18 10:41:41 -05:00
Brad King
b6da1d1271 ENH: Added support for special variables CMAKE_CURRENT_LIST_FILE and CMAKE_CURRENT_LIST_LINE that evaluate to the file name and line number in which they appear. This implements the feature request from bug 1012. 2004-08-04 10:45:11 -04:00
Bill Hoffman
f82c1bfc8d ENH: make it run much faster 2004-05-19 16:04:48 -04:00
Andy Cedilnik
28f6e1b194 ENH: Add ARGV and ARGN support to MACRO command. ARGV is the list of all arguments and ARGN is the list of all nonexpected arguments 2004-04-29 17:41:33 -04:00
Bill Hoffman
c19a70b3ad WRN: remove warnings 2004-04-27 08:30:25 -04:00
Ken Martin
2d53fcf035 macros now support varargs 2004-04-26 11:11:57 -04:00
Andy Cedilnik
96d561aabc ENH: Add option to retrieve list of macros. Close Bug #25 - Get_CMAKE_PROPERTIES 2003-08-06 18:54:13 -04:00
Ken Martin
76b344c6fe performance improvements 2003-06-24 15:11:21 -04:00
Ken Martin
b56dcc2a30 perf improvement 2003-06-23 16:26:48 -04:00
Ken Martin
6b22b8c556 better error reporting 2003-04-28 13:16:18 -04:00
Brad King
a37a934410 ENH: Improved error message for macro invoked with incorrect number of arguments. 2002-12-17 11:58:55 -05:00
Brad King
54541bd40a ENH: Improved filename/line number reporting in error message. Macro invocations now chain up the error message. 2002-12-12 11:36:28 -05:00
Brad King
4888c088ae ENH: Moved ExpandListVariables out of individual commands. Argument evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside. 2002-12-11 18:13:33 -05:00
Brad King
1f6a3c67b1 ENH: Added reference to Copyright.txt. Removed old reference to ITK copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs. 2002-10-23 18:03:27 -04:00
Ken Martin
7ddb408621 removed some includes 2002-09-27 16:24:10 -04:00
Ken Martin
4380c3b0f1 minor fix 2002-08-16 11:20:48 -04:00
Ken Martin
216c985f72 added new command 2002-08-13 15:46:33 -04:00