diff --git a/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp b/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp index 980f87c443a..0e186ee2138 100644 --- a/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp @@ -177,6 +177,16 @@ bool CMakeCbpParser::parseCbpFile(Kit *kit, const QString &fileName, const QStri sortFiles(); fi.close(); + + // There is always a clean target: + CMakeBuildTarget cleanTarget; + cleanTarget.title = QLatin1String("clean"); + cleanTarget.targetType = UtilityType; + cleanTarget.workingDirectory = m_buildDirectory; + cleanTarget.sourceDirectory = m_sourceDirectory; + + m_buildTargets.append(cleanTarget); + return true; } return false; diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index 290c5845cd3..2efb8d2d33d 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.h +++ b/src/plugins/cmakeprojectmanager/cmakeproject.h @@ -65,7 +65,8 @@ class CMakeManager; enum TargetType { ExecutableType = 0, StaticLibraryType = 2, - DynamicLibraryType = 3 + DynamicLibraryType = 3, + UtilityType = 64 }; struct CMAKE_EXPORT CMakeBuildTarget