| 134 | } |
| 135 | |
| 136 | KJob* CMakeBuilder::clean(KDevelop::ProjectBaseItem *dom) |
| 137 | { |
| 138 | IProjectBuilder* builder = builderForProject(dom->project()); |
| 139 | if( builder ) |
| 140 | { |
| 141 | bool valid; |
| 142 | KJob* configure = checkConfigureJob(dom->project(), valid); |
| 143 | |
| 144 | KDevelop::ProjectBaseItem* item = dom; |
| 145 | if(dom->file()) //It doesn't work to compile a file |
| 146 | item=(KDevelop::ProjectBaseItem*) dom->parent(); |
| 147 | |
| 148 | qCDebug(KDEV_CMAKEBUILDER) << "Cleaning with" << builder; |
| 149 | KJob* clean = builder->clean(item); |
| 150 | if( configure ) { |
| 151 | auto* builderJob = new KDevelop::BuilderJob; |
| 152 | builderJob->addCustomJob( KDevelop::BuilderJob::Configure, configure, item ); |
| 153 | builderJob->addCustomJob( KDevelop::BuilderJob::Clean, clean, item ); |
| 154 | builderJob->updateJobName(); |
| 155 | clean = builderJob; |
| 156 | } |
| 157 | return clean; |
| 158 | } |
| 159 | return new ErrorJob(this, i18n("Could not find a builder for %1", dom->project()->name())); |
| 160 | } |
| 161 | |
| 162 | KJob* CMakeBuilder::install(KDevelop::ProjectBaseItem *dom, const QUrl &installPrefix) |
| 163 | { |
nothing calls this directly
no test coverage detected