This reverts commit 5561e174117ff395d65b6978d04b62c1a1275138 The logic was moved from cmake into lit fixing the issue that lead to the revert and potentially others with multi-config cmake generators Differential Revision: https://reviews.llvm.org/D143925