I encountered a similar problem when trying to add libraries to find potentioal memory leaks in my project. I added:
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
which allows me to use this function to scan for memory leaks:
_CrtDumpMemoryLeaks();
However, this seemed to break my CMake all of a sudden. My guess is that you have a similar problem with a library that’s causing some issue. Try to eliminate them 1 by 1 and see what happens or shift them around.
After moving these includes to the bottom of my include list, it all worked fine again.