https://github.com/Kitware/CMake
Raw File
Tip revision: 22612dd53a46c7f9b4c3f4b7dbe5c78f9afd9581 authored by Brad King on 15 March 2021, 13:39:14 UTC
CMake 3.19.7
Tip revision: 22612dd
TestTimeout.c
#if defined(_WIN32)
#  include <windows.h>
#else
#  include <unistd.h>
#endif

#include <stdio.h>

int main(void)
{
#ifdef FORK
  pid_t pid = fork();
  if (pid != 0) {
    return 0;
  }
#endif

#if defined(_WIN32)
  Sleep((TIMEOUT + 4) * 1000);
#else
  sleep((TIMEOUT + 4));
#endif
  return 0;
}
back to top