This reverts commit 2e75681b55. Restore the clean up change. The underlying CMake issue was resolved in 372ad32734.
2e75681b55
372ad32734