set_directory_properties: Restore in script mode
Since !1004 (merged) this command was
accidentally not allowed in script mode. It was dropped because
ctest -S
mode needs to start with CMake's normal script mode and
then replace the set_directory_properties
implementation. Restore
the normal set_directory_properties
in script mode and then add
special logic to replace it in ctest. Also add a test case.
Fixes: #18523 (closed)