check for Makefile (only present on cmake success) instead of CMakeCache.txt (present even if cmake errors).