forked from qt-creator/qt-creator
CMakePM: Make "Build type" aspect visible
For single configuration projects if you change the build type aspect you will change the CMAKE_BUILD_TYPE variable. When switching the build directory the existing CMAKE_BUILD_TYPE will be set as build type aspect. Fixes: QTCREATORBUG-25451 Change-Id: I13519e95c316c556cc1348fba6121637d2fd4275 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -76,16 +76,6 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
||||
buildDirectory = bc->buildDirectory();
|
||||
|
||||
cmakeBuildType = bc->cmakeBuildType();
|
||||
if (cmakeBuildType.isEmpty()) {
|
||||
// The empty build type might be just a case of loading of an existing project
|
||||
// that doesn't have the "CMake.Build.Type" aspect saved
|
||||
const CMakeConfig config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments);
|
||||
if (!config.isEmpty()) {
|
||||
cmakeBuildType = QString::fromLatin1(CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config));
|
||||
if (!cmakeBuildType.isEmpty())
|
||||
bc->setCMakeBuildType(cmakeBuildType);
|
||||
}
|
||||
}
|
||||
|
||||
environment = bc->environment();
|
||||
// Disable distributed building for configuration runs. CMake does not do those in parallel,
|
||||
|
Reference in New Issue
Block a user