Why is mark_as_advanced() considered a scripting command

I’m wondering why the mark_as_advanced() command is considered a scripting command. It’s sole purpose is for marking cache variables as advanced or not, but cache variables only make sense for projects. Does this command have any effect at all in script mode? If not, should its role and documentation be changed to reflect this?

See https://gitlab.kitware.com/cmake/cmake/-/commit/732788d191afca01f19a147b74bfe145ce36b957.

Basically, find_package should work in script mode and if mark_as_advanced isn’t scriptable, some modules won’t work.

2 Likes