This patch adds two macros cmake_push_check_state() and cmake_pop_check_state(), which can be used to save and restore the contents of the CMAKE_REQUIRED_xxx variables. Alex