In your example, there is no difference. But there can be differences:
optionhas a default value ofOFF.- You can make an option dependent on other options with
CMakeDependentOption setaccepts types other thanBOOL, especially ;-lists.
Additionally, when you use an option you are indicating to your user that it can be set safely. Setting internal variables from the outside might subtly break the script with invalid values.