CMAKE_ROLE — CMake 4.2.6 Documentation

# CMAKE_ROLE

Added in version 3.14.

Tells what mode the current running script is in. Could be one of several values:

`PROJECT`

  Running in project mode (processing a `CMakeLists.txt` file).

`SCRIPT`

  Running in cmake -P script mode.

`FIND_PACKAGE`

  Running in cmake --find-package mode.

`CTEST`

  Running in CTest script mode.

`CPACK`

  Running in CPack.

## See Also

- The `CMAKE_SCRIPT_MODE_FILE` variable.