cmake ctest_memcheck(CAPTURE_CMAKE_ERROR) examples

trilinos/Trilinos cmake/SimpleTesting/cmake/ctest-stage-test.cmake :21

ctest_memcheck(PARALLEL_LEVEL ${TEST_PARALLEL_LEVEL}
               CAPTURE_CMAKE_ERROR captured_cmake_error
               RETURN_VALUE test_error)