TestRepeatUntilFail.cmake 237 B

123456789
  1. include("${COUNT_FILE}" OPTIONAL)
  2. if(NOT COUNT)
  3. set(COUNT 0)
  4. endif()
  5. math(EXPR COUNT "${COUNT} + 1")
  6. file(WRITE "${COUNT_FILE}" "set(COUNT ${COUNT})\n")
  7. if(COUNT EQUAL 2)
  8. message(FATAL_ERROR "this test fails on the 2nd run")
  9. endif()