https://github.com/Kitware/CMake
Raw File
Tip revision: 554ebf643dfad2eb6877c3d5530b005cee453513 authored by Brad King on 08 July 2021, 13:46:27 UTC
CMake 3.21.0-rc3
Tip revision: 554ebf6
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\" still exists!\n", *f);
      result = 1;
      }
    }
  return result;
}
back to top