MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / isSourceDirty

Method isSourceDirty

src/attributes.cpp:3247–3265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

sourceCppContextFunction · 0.80

Calls 4

FileInfoClass · 0.85
parseSourceDependenciesFunction · 0.85
lastModifiedMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected