1 2 3 4 5 6 7
file(READ out.txt IN) message("${IN}") if(IN MATCHES Hello AND IN MATCHES World) message("Passed") else() message(FATAL_ERROR "Hello world not found") endif()