| 3245 | bool isBuilt() const { return FileInfo(dynlibPath()).exists(); }; |
| 3246 | |
| 3247 | bool isSourceDirty() const { |
| 3248 | // source file out of date means we're dirty |
| 3249 | if (FileInfo(cppSourcePath_).lastModified() > |
| 3250 | FileInfo(generatedCppSourcePath()).lastModified()) |
| 3251 | return true; // #nocov |
| 3252 | |
| 3253 | // no dynlib means we're dirty |
| 3254 | if (!FileInfo(dynlibPath()).exists()) |
| 3255 | return true; // #nocov |
| 3256 | |
| 3257 | // variation in source dependencies means we're dirty |
| 3258 | std::vector<FileInfo> sourceDependencies = parseSourceDependencies( |
| 3259 | cppSourcePath_); |
| 3260 | if (sourceDependencies != sourceDependencies_) |
| 3261 | return true; // #nocov |
| 3262 | |
| 3263 | // not dirty |
| 3264 | return false; |
| 3265 | } |
| 3266 | |
| 3267 | void regenerateSource(const std::string& cacheDir) { |
| 3268 |
no test coverage detected