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