summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakeLanguageCommand.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-08-05 08:55:32 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-08-22 14:25:53 (GMT)
commit44a2f3f3324a608062eb7b88072c7640f80f4a5c (patch)
treebcb7ee5b371d05c71d76fb12214c0b82039fa2de /Source/cmCMakeLanguageCommand.cxx
parent604993248fdee0bec8ab8c74c1173c67496a7dfd (diff)
downloadCMake-44a2f3f3324a608062eb7b88072c7640f80f4a5c.zip
CMake-44a2f3f3324a608062eb7b88072c7640f80f4a5c.tar.gz
CMake-44a2f3f3324a608062eb7b88072c7640f80f4a5c.tar.bz2
Add new flow-control commands for variables and policies scopes management
Add block() and endblock() commands offering the capability to create new scopes for variables and/or policies. Fixes: #20171
Diffstat (limited to 'Source/cmCMakeLanguageCommand.cxx')
-rw-r--r--Source/cmCMakeLanguageCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCMakeLanguageCommand.cxx b/Source/cmCMakeLanguageCommand.cxx
index 76561c3..68e658c 100644
--- a/Source/cmCMakeLanguageCommand.cxx
+++ b/Source/cmCMakeLanguageCommand.cxx
@@ -36,13 +36,14 @@ bool FatalError(cmExecutionStatus& status, std::string const& error)
return false;
}
-std::array<cm::static_string_view, 12> InvalidCommands{
+std::array<cm::static_string_view, 14> InvalidCommands{
{ // clang-format off
"function"_s, "endfunction"_s,
"macro"_s, "endmacro"_s,
"if"_s, "elseif"_s, "else"_s, "endif"_s,
"while"_s, "endwhile"_s,
- "foreach"_s, "endforeach"_s
+ "foreach"_s, "endforeach"_s,
+ "block"_s, "endblock"_s
} // clang-format on
};