MCPcopy Create free account
hub / github.com/Kitware/CMake / TestAndRemoveFile

Function TestAndRemoveFile

Tests/Complex/Executable/complex.cxx:67–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65// ======================================================================
66
67void TestAndRemoveFile(char const* filename)
68{
69 struct stat st;
70 if (stat(filename, &st) < 0) {
71 cmFailed("Could not find file: ", filename);
72 } else {
73 if (remove(filename) < 0) {
74 cmFailed("Unable to remove file. It does not imply that this test "
75 "failed, but it *will* be corrupted thereafter if this file is "
76 "not removed: ",
77 filename);
78 } else {
79 cmPassed("Find and remove file: ", filename);
80 }
81 }
82}
83
84// ======================================================================
85

Callers 1

mainFunction · 0.70

Calls 3

statClass · 0.70
cmFailedFunction · 0.70
cmPassedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…