Skip to content
  • Brad King's avatar
    ENH: Better handling of mismatched blocks · 1dcc5b45
    Brad King authored
    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.
    1dcc5b45