| 446 | // ******************** |
| 447 | |
| 448 | KJob* MesonManager::newBuildDirectory(IProject* project, Meson::BuildDir* outBuildDir) |
| 449 | { |
| 450 | Q_ASSERT(project); |
| 451 | MesonNewBuildDir newBD(project); |
| 452 | |
| 453 | if (!newBD.exec() || !newBD.isConfigValid()) { |
| 454 | qCWarning(KDEV_Meson) << "Failed to create new build directory for project " << project->name(); |
| 455 | return nullptr; |
| 456 | } |
| 457 | |
| 458 | Meson::BuildDir buildDir = newBD.currentConfig(); |
| 459 | Meson::MesonConfig mesonCfg = Meson::getMesonConfig(project); |
| 460 | buildDir.canonicalizePaths(); |
| 461 | mesonCfg.currentIndex = mesonCfg.addBuildDir(buildDir); |
| 462 | Meson::writeMesonConfig(project, mesonCfg); |
| 463 | |
| 464 | if (outBuildDir) { |
| 465 | *outBuildDir = buildDir; |
| 466 | } |
| 467 | |
| 468 | return m_builder->configure(project, buildDir, newBD.mesonArgs()); |
| 469 | } |
| 470 | |
| 471 | QStringList MesonManager::supportedMesonBackends() const |
| 472 | { |
no test coverage detected