CMake: Make sure there is a "clean" target

Change-Id: I9e3eb49b7f5a2d7d5c89a53969c4703b3ce99330
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-01-07 11:47:56 +01:00
parent 16b1430d2a
commit 5419b02058
2 changed files with 12 additions and 1 deletions

View File

@@ -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;

View File

@@ -65,7 +65,8 @@ class CMakeManager;
enum TargetType {
ExecutableType = 0,
StaticLibraryType = 2,
DynamicLibraryType = 3
DynamicLibraryType = 3,
UtilityType = 64
};
struct CMAKE_EXPORT CMakeBuildTarget