https://github.com/Kitware/CMake
Raw File
Tip revision: 7f8f6dbf45aa5250281c7e383e3d32599590564b authored by David Cole on 30 December 2011, 16:05:59 UTC
CMake 2.8.7
Tip revision: 7f8f6db
check_clean.c.in
#include <stdio.h>

int main()
{
  /* The list of files to check.  */
  const char* files[] =
    {
      @CHECK_FILES@
      0
    };

  /* No file should exist.  */
  const char** f = files;
  int result = 0;
  for(; *f; ++f)
    {
    FILE* pf = fopen(*f, "rb");
    if(pf)
      {
      fclose(pf);
      fprintf(stderr, "File \"%s\" exists!", *f);
      result = 1;
      }
    }
  return result;
}
back to top