Commit 4c199a3c authored by con's avatar con
Browse files

Fix problem when canceling cmake build configuration wizard.

parent 92b905a6
......@@ -104,11 +104,6 @@ bool CMakeBuildConfigurationFactory::create(const QString &type) const
if (!ok || buildConfigurationName.isEmpty())
return false;
BuildConfiguration *bc = new BuildConfiguration(buildConfigurationName);
m_project->addBuildConfiguration(bc);
// Default to all
if (m_project->targets().contains("all"))
m_project->makeStep()->setBuildTarget(buildConfigurationName, "all", true);
CMakeOpenProjectWizard copw(m_project->projectManager(),
m_project->sourceDirectory(),
......@@ -118,6 +113,10 @@ bool CMakeBuildConfigurationFactory::create(const QString &type) const
delete bc;
return false;
}
m_project->addBuildConfiguration(bc); // this also makes the name unique
// Default to all
if (m_project->targets().contains("all"))
m_project->makeStep()->setBuildTarget(buildConfigurationName, "all", true);
bc->setValue("buildDirectory", copw.buildDirectory());
bc->setValue("msvcVersion", copw.msvcVersion());
m_project->parseCMakeLists();
......
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