Commit 5419b020 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Make sure there is a "clean" target

Change-Id: I9e3eb49b7f5a2d7d5c89a53969c4703b3ce99330
Reviewed-by: default avatarCristian Adam <cristian.adam@gmail.com>
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 16b1430d
...@@ -177,6 +177,16 @@ bool CMakeCbpParser::parseCbpFile(Kit *kit, const QString &fileName, const QStri ...@@ -177,6 +177,16 @@ bool CMakeCbpParser::parseCbpFile(Kit *kit, const QString &fileName, const QStri
sortFiles(); sortFiles();
fi.close(); 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 true;
} }
return false; return false;
......
...@@ -65,7 +65,8 @@ class CMakeManager; ...@@ -65,7 +65,8 @@ class CMakeManager;
enum TargetType { enum TargetType {
ExecutableType = 0, ExecutableType = 0,
StaticLibraryType = 2, StaticLibraryType = 2,
DynamicLibraryType = 3 DynamicLibraryType = 3,
UtilityType = 64
}; };
struct CMAKE_EXPORT CMakeBuildTarget struct CMAKE_EXPORT CMakeBuildTarget
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment