This reverts commit fa65a228f4b46346e69e9b95805a8bcfa8483a60.
This relands commit ab405fb6e9ff9202ca722f632b945d4b84c653f5.
There was an issue where CMake versions <3.23.0 would not properly parse
dep files, causing the build to file. This patch fixes that by just
making CMake versions <3.23.0 use the fallback behavior.