automated testing of CMakelists.txt file before generation

has anyone developed a test or script to automate testing of CMakelists.txt file before generation. I need to test the CMakeList files to make sure the “developers” don’t mess up the defined variables before specific build get generated.