diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2014-11-18 15:34:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-25 19:14:20 (GMT) |
commit | d54617d0068fc5acfa2079d1e8de8f38365564ab (patch) | |
tree | aa52361e45033aa8ca16d7d95a58535a3118c5c9 /Help/policy | |
parent | bae604d9a80d5d97c676c85848e37783a153ff19 (diff) | |
download | CMake-d54617d0068fc5acfa2079d1e8de8f38365564ab.zip CMake-d54617d0068fc5acfa2079d1e8de8f38365564ab.tar.gz CMake-d54617d0068fc5acfa2079d1e8de8f38365564ab.tar.bz2 |
break: Add policy CMP0055 to check calls strictly
Reject break() without loop scope or any arguments.
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Help/policy')
-rw-r--r-- | Help/policy/CMP0055.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/policy/CMP0055.rst b/Help/policy/CMP0055.rst new file mode 100644 index 0000000..fe7ab6f --- /dev/null +++ b/Help/policy/CMP0055.rst @@ -0,0 +1,17 @@ +CMP0055 +------- + +Strict checking for the :command:`break` command. + +CMake 3.1 and lower allowed calls to the :command:`break` command +outside of a loop context and also ignored any given arguments. +This was undefined behavior. + +The OLD behavior for this policy is to allow :command:`break` to be placed +outside of loop contexts and ignores any arguments. The NEW behavior for this +policy is to issue an error if a misplaced break or any arguments are found. + +This policy was introduced in CMake version 3.2. +CMake version |release| warns when the policy is not set and uses +OLD behavior. Use the cmake_policy command to set it to OLD or +NEW explicitly. |