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

Method CanIWriteThisFile

Source/cmMakefile.cxx:2328–2342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2326}
2327
2328bool cmMakefile::CanIWriteThisFile(std::string const& fileName) const
2329{
2330 if (!this->IsOn("CMAKE_DISABLE_SOURCE_CHANGES")) {
2331 return true;
2332 }
2333 // If we are doing an in-source build, then the test will always fail
2334 if (cmSystemTools::SameFile(this->GetHomeDirectory(),
2335 this->GetHomeOutputDirectory())) {
2336 return !this->IsOn("CMAKE_DISABLE_IN_SOURCE_BUILD");
2337 }
2338
2339 return !cmSystemTools::IsSubDirectory(fileName, this->GetHomeDirectory()) ||
2340 cmSystemTools::IsSubDirectory(fileName, this->GetHomeOutputDirectory()) ||
2341 cmSystemTools::SameFile(fileName, this->GetHomeOutputDirectory());
2342}
2343
2344std::string const& cmMakefile::GetRequiredDefinition(
2345 std::string const& name) const

Callers 12

ConfigureFileMethod · 0.95
cmMakeDirectoryCommandFunction · 0.80
CreateGeneratedSourceFunction · 0.80
cmExecuteProcessCommandFunction · 0.80
HandleTargetsModeFunction · 0.80
HandleExportModeFunction · 0.80
cmWriteFileCommandFunction · 0.80
cmConfigureFileCommandFunction · 0.80
HandleWriteImplFunction · 0.80
HandleTouchImplFunction · 0.80
HandleConfigureCommandFunction · 0.80

Calls 1

IsOnMethod · 0.95

Tested by

no test coverage detected