Changeset View
Changeset View
Standalone View
Standalone View
plugins/meson/mesonmanager.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 107 | { | |||
---|---|---|---|---|---|
110 | return buildDir.buildDir; | 110 | return buildDir.buildDir; | ||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | IProjectBuilder* MesonManager::builder() const | 113 | IProjectBuilder* MesonManager::builder() const | ||
114 | { | 114 | { | ||
115 | return m_builder; | 115 | return m_builder; | ||
116 | } | 116 | } | ||
117 | 117 | | |||
118 | Meson::BuildDir MesonManager::newBuildDirectory(IProject* project) | 118 | KJob *MesonManager::newBuildDirectory(IProject* project) | ||
119 | { | 119 | { | ||
120 | Q_ASSERT(project); | 120 | Q_ASSERT(project); | ||
121 | MesonNewBuildDir newBD(project); | 121 | MesonNewBuildDir newBD(project); | ||
122 | 122 | | |||
123 | if (!newBD.exec() || !newBD.isConfigValid()) { | 123 | if (!newBD.exec() || !newBD.isConfigValid()) { | ||
124 | qCWarning(KDEV_Meson) << "Failed to create new build directory for project " << project->name(); | 124 | qCWarning(KDEV_Meson) << "Failed to create new build directory for project " << project->name(); | ||
125 | return Meson::BuildDir(); | 125 | return nullptr; | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | Meson::BuildDir buildDir = newBD.currentConfig(); | 128 | Meson::BuildDir buildDir = newBD.currentConfig(); | ||
129 | Meson::MesonConfig mesonCfg = Meson::getMesonConfig(project); | 129 | Meson::MesonConfig mesonCfg = Meson::getMesonConfig(project); | ||
130 | buildDir.canonicalizePaths(); | 130 | buildDir.canonicalizePaths(); | ||
131 | mesonCfg.addBuildDir(buildDir); | 131 | mesonCfg.currentIndex = mesonCfg.addBuildDir(buildDir); | ||
132 | Meson::writeMesonConfig(project, mesonCfg); | 132 | Meson::writeMesonConfig(project, mesonCfg); | ||
133 | 133 | | |||
134 | return buildDir; | 134 | return m_builder->configure(project, buildDir, newBD.mesonArgs()); | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | QStringList MesonManager::supportedMesonBackends() const | 137 | QStringList MesonManager::supportedMesonBackends() const | ||
138 | { | 138 | { | ||
139 | // Maybe add support for other generators | 139 | // Maybe add support for other generators | ||
140 | return { GENERATOR_NINJA }; | 140 | return { GENERATOR_NINJA }; | ||
141 | } | 141 | } | ||
142 | 142 | | |||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |