forked from qt-creator/qt-creator
Qmake: Accept global build settings as authorative
... when initializing build configuration. Potential re-alignment with contents of pre-existing Makefiles is confusing at best, and depends on the presence of Makefiles that are typically close to invisble when using an IDE. Change-Id: Iadbab4f32badfbf948cfa2a1b256932acbfe858f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include <projectexplorer/buildaspects.h>
|
#include <projectexplorer/buildaspects.h>
|
||||||
#include <projectexplorer/buildinfo.h>
|
#include <projectexplorer/buildinfo.h>
|
||||||
#include <projectexplorer/buildmanager.h>
|
#include <projectexplorer/buildmanager.h>
|
||||||
|
#include <projectexplorer/buildpropertiessettings.h>
|
||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
#include <projectexplorer/kit.h>
|
#include <projectexplorer/kit.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
@@ -73,6 +74,14 @@ using namespace QmakeProjectManager::Internal;
|
|||||||
|
|
||||||
namespace QmakeProjectManager {
|
namespace QmakeProjectManager {
|
||||||
|
|
||||||
|
QmakeExtraBuildInfo::QmakeExtraBuildInfo()
|
||||||
|
{
|
||||||
|
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
|
||||||
|
config.separateDebugInfo = settings.separateDebugInfo;
|
||||||
|
config.linkQmlDebuggingQQ2 = settings.qmlDebugging;
|
||||||
|
config.useQtQuickCompiler = settings.qtQuickCompiler;
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Helpers:
|
// Helpers:
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -717,17 +726,21 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
|||||||
const FilePath &projectPath,
|
const FilePath &projectPath,
|
||||||
BuildConfiguration::BuildType type) const
|
BuildConfiguration::BuildType type) const
|
||||||
{
|
{
|
||||||
|
const BuildPropertiesSettings &settings = ProjectExplorerPlugin::buildPropertiesSettings();
|
||||||
BaseQtVersion *version = QtKitAspect::qtVersion(k);
|
BaseQtVersion *version = QtKitAspect::qtVersion(k);
|
||||||
QmakeExtraBuildInfo extraInfo;
|
QmakeExtraBuildInfo extraInfo;
|
||||||
BuildInfo info(this);
|
BuildInfo info(this);
|
||||||
QString suffix;
|
QString suffix;
|
||||||
|
|
||||||
if (type == BuildConfiguration::Release) {
|
if (type == BuildConfiguration::Release) {
|
||||||
//: The name of the release build configuration created by default for a qmake project.
|
//: The name of the release build configuration created by default for a qmake project.
|
||||||
info.displayName = tr("Release");
|
info.displayName = tr("Release");
|
||||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||||
suffix = tr("Release", "Shadow build directory suffix");
|
suffix = tr("Release", "Shadow build directory suffix");
|
||||||
|
if (settings.qtQuickCompiler == TriState::Default) {
|
||||||
if (version && version->isQtQuickCompilerSupported())
|
if (version && version->isQtQuickCompilerSupported())
|
||||||
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
|
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (type == BuildConfiguration::Debug) {
|
if (type == BuildConfiguration::Debug) {
|
||||||
//: The name of the debug build configuration created by default for a qmake project.
|
//: The name of the debug build configuration created by default for a qmake project.
|
||||||
@@ -739,13 +752,19 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
|||||||
info.displayName = tr("Profile");
|
info.displayName = tr("Profile");
|
||||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||||
suffix = tr("Profile", "Shadow build directory suffix");
|
suffix = tr("Profile", "Shadow build directory suffix");
|
||||||
|
if (settings.separateDebugInfo == TriState::Default)
|
||||||
extraInfo.config.separateDebugInfo = TriState::Enabled;
|
extraInfo.config.separateDebugInfo = TriState::Enabled;
|
||||||
|
|
||||||
|
if (settings.qtQuickCompiler == TriState::Default) {
|
||||||
if (version && version->isQtQuickCompilerSupported())
|
if (version && version->isQtQuickCompilerSupported())
|
||||||
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
|
extraInfo.config.useQtQuickCompiler = TriState::Enabled;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (settings.qmlDebugging == TriState::Default) {
|
||||||
if (version && version->isQmlDebuggingSupported())
|
if (version && version->isQmlDebuggingSupported())
|
||||||
extraInfo.config.linkQmlDebuggingQQ2 = TriState::Enabled;
|
extraInfo.config.linkQmlDebuggingQQ2 = TriState::Enabled;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
info.typeName = info.displayName;
|
info.typeName = info.displayName;
|
||||||
// Leave info.buildDirectory unset;
|
// Leave info.buildDirectory unset;
|
||||||
info.kitId = k->id();
|
info.kitId = k->id();
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ namespace QmakeProjectManager {
|
|||||||
class QmakeExtraBuildInfo final
|
class QmakeExtraBuildInfo final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
QmakeExtraBuildInfo();
|
||||||
|
|
||||||
QString additionalArguments;
|
QString additionalArguments;
|
||||||
QString makefile;
|
QString makefile;
|
||||||
QMakeStepConfig config;
|
QMakeStepConfig config;
|
||||||
|
|||||||
Reference in New Issue
Block a user