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

Method Open

Source/cmExtraSublimeTextGenerator.cxx:442–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442bool cmExtraSublimeTextGenerator::Open(std::string const& bindir,
443 std::string const& projectName,
444 bool dryRun)
445{
446 cmValue sublExecutable =
447 this->GlobalGenerator->GetCMakeInstance()->GetCacheDefinition(
448 "CMAKE_SUBLIMETEXT_EXECUTABLE");
449 if (!sublExecutable) {
450 return false;
451 }
452 if (cmIsNOTFOUND(*sublExecutable)) {
453 return false;
454 }
455
456 std::string filename =
457 cmStrCat(bindir, '/', projectName, ".sublime-project");
458 if (dryRun) {
459 return cmSystemTools::FileExists(filename, true);
460 }
461
462 return cmSystemTools::RunSingleCommand(
463 { *sublExecutable, "--project", filename });
464}

Callers

nothing calls this directly

Calls 5

cmIsNOTFOUNDFunction · 0.85
GetCacheDefinitionMethod · 0.80
cmStrCatFunction · 0.70
FileExistsFunction · 0.50
GetCMakeInstanceMethod · 0.45

Tested by

no test coverage detected