aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/qbs/commandlinefrontend.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-06-10 23:31:05 -0700
committerJake Petroules <jake.petroules@qt.io>2016-06-20 07:22:56 +0000
commit532e8ea991cf0dede72d3f357619f49f4b36187b (patch)
tree048ac18f8d5105eae0e56e666345e892f7467bf9 /src/app/qbs/commandlinefrontend.cpp
parente55b41dde5789bd45164555f2bddc0a8fe15771d (diff)
Stop special casing qbs.buildVariant in command line handling.
This introduces qbs.configurationName, which takes the place of qbs.buildVariant in the command line and acts as a unique identifier for each build configuration, rather than relying on the combination of qbs.buildVariant and the profile name to do so. No longer special casing qbs.buildVariant allows the variant to be decoupled from the build configuration, and allow scenarios where a project may contain products hardcoded for particular build variants, and in future, special debug-and-release builds which create a single framework product containing multiple build variants. Incidentally, this change allows building multiple configurations of the same build variant and profile name combination, since the build configuration is no longer keyed on the aggregate of those values. Building for different profiles with the same configuration name in parallel is now no longer possible, but this is easily worked around by simply specifying different configuration names for such combinations. For example, the following is now possible: qbs \ static profile:a qbs.buildVariant:release project.useStaticLibraries:true \ dynamic profile:a qbs.buildVariant:release project.useStaticLibraries:false [ChangeLog] Each build configuration now requires a unique name, which is specified on the command line in the same place that qbs.buildVariant used to be specified. This allows building for multiple configurations with the same variant. Change-Id: I96ab9fc96861ab7e6a04a7d291a093115c22010e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/app/qbs/commandlinefrontend.cpp')
-rw-r--r--src/app/qbs/commandlinefrontend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp
index 35e059f6a..4c84ed77f 100644
--- a/src/app/qbs/commandlinefrontend.cpp
+++ b/src/app/qbs/commandlinefrontend.cpp
@@ -140,7 +140,7 @@ void CommandLineFrontend::start()
params.setRestoreBehavior(SetupProjectParameters::RestoreOnly);
foreach (const QVariantMap &buildConfig, m_parser.buildConfigurations()) {
QVariantMap userConfig = buildConfig;
- const QString buildVariantKey = QLatin1String("qbs.buildVariant");
+ const QString configurationKey = QLatin1String("qbs.configurationName");
const QString profileKey = QLatin1String("qbs.profile");
const QString installRootKey = QLatin1String("qbs.installRoot");
QString installRoot = userConfig.value(installRootKey).toString();
@@ -148,7 +148,7 @@ void CommandLineFrontend::start()
installRoot.prepend(QLatin1Char('/')).prepend(QDir::currentPath());
userConfig.insert(installRootKey, installRoot);
}
- const QString buildVariant = userConfig.take(buildVariantKey).toString();
+ const QString configurationName = userConfig.take(configurationKey).toString();
QString profileName = userConfig.take(profileKey).toString();
if (profileName.isEmpty())
profileName = m_settings->defaultProfile();
@@ -166,7 +166,7 @@ void CommandLineFrontend::start()
params.setLibexecPath(QDir::cleanPath(QCoreApplication::applicationDirPath()
+ QLatin1String("/" QBS_RELATIVE_LIBEXEC_PATH)));
params.setTopLevelProfile(profileName);
- params.setBuildVariant(buildVariant);
+ params.setConfigurationName(configurationName);
params.setBuildRoot(buildDirectory(profileName));
params.setOverriddenValues(userConfig);
SetupProjectJob * const job = Project().setupProject(params,