CMake/Tests/MakeClean/check_clean.c.in
Sebastian Holtermann c11f089d73 Tests: Extend MakeClean test to cover ADDITIONAL_CLEAN_FILES
This extends the MakeClean test to cover the
- ADDITIONAL_CLEAN_FILES directory property and the
- ADDITIONAL_CLEAN_FILES target property

as well.
2019-05-14 17:50:14 +02:00

27 lines
412 B
C

#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;
}