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

Method EnsureDirectoryExists

Source/cmFastbuildNormalTargetGenerator.cxx:517–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void cmFastbuildNormalTargetGenerator::EnsureDirectoryExists(
518 std::string const& path) const
519{
520 if (cmSystemTools::FileIsFullPath(path.c_str())) {
521 cmSystemTools::MakeDirectory(path.c_str());
522 } else {
523 auto* gg = this->GetGlobalGenerator();
524 std::string fullPath = gg->GetCMakeInstance()->GetHomeOutputDirectory();
525 // Also ensures there is a trailing slash.
526 fullPath += path;
527 cmSystemTools::MakeDirectory(fullPath);
528 }
529}
530
531void cmFastbuildNormalTargetGenerator::EnsureParentDirectoryExists(
532 std::string const& path) const

Callers 2

ComputePathsMethod · 0.95

Calls 3

c_strMethod · 0.80
GetGlobalGeneratorMethod · 0.45
GetCMakeInstanceMethod · 0.45

Tested by

no test coverage detected