CMake/Tests/RunCMake/cmake_language/exit_5_script_with_command.cmake
leha-bot 1bb1769235 cmake_language: Add EXIT subcommand
Add tests to cover these cases:

* run as regular CMake module, in NORMAL_MODE (expected to fail);
* run as CMake script in SCRIPT_MODE (expected to exit with given code);
* run as CMake script that `include()`-s another script with EXIT subcommand;
* run as CMake script which EVAL-uates EXIT subcommand via
  `cmake_language(EVAL CODE "<cmake code>")`.

Fixes: #23162
2024-01-16 10:41:31 +03:00

4 lines
83 B
CMake

cmake_language(EXIT 5)
message(FATAL_ERROR "cmake_language(EXIT 5) doesn't work")