| 440 | } |
| 441 | |
| 442 | bool 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 | } |
nothing calls this directly
no test coverage detected