Is BUILD_SHARED_LIBS an implicit option without being declared as a project option?

According to the docs and this tutorial, it appears that the recommendation is to declare BUILD_SHARED_LIBS as an option().

What precisely is the working status of this flag when it is not declared by the project? It seems like it works and defaults to OFF.

It looks like there’s no problem setting it from the command line with -DBUILD_SHARED_LIBS=ON, and if not set then it is implicitly an empty string value (meaning the condition is off).