This commit adds a "CMake Install" deployment step, which is using
"cmake --install" command.
"cmake --install" command has been added in CMake 3.15, this is why the
minimum CMake version has been updated to 3.15.
Note that CMakeBuildSystem::makeInstallCommand is still using cmake --
build --target install due to a CMake bug regarding "Ninja Multi-Config"
generator, which doesn't intall all binaries via "cmake --install".
Fixes: QTCREATORBUG-25880
Change-Id: I504674c380055d8ef136d344a78b80c17ecf9765
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Emit addOutput() signal directly. This will add a newline after
the message. Use OutputFormat::ErrorMessage instead of
OutputFormat::Stderr.
Change-Id: Id5e95dd00dca5e57b67c583a1b11071bf4101880
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Merge processSucceeded with processFinished into one virtual
function. Leave default implementation empty, so that
reimplementations don't need to call base impl. Move
processFinished into private section. Pass just one bool success
parameter into processFinished.
Change-Id: Ide3e262de0c0c5583c9fec2426fa460b6b74a49d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mostly unused #include's, also sort them or reduce scope.
A few namespaces, ...
Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
By default xcodebuild does not try create / download a provisioning
profile for a project if a valid one does not exist locally
in ~/Library/MobileDevice/Provisioning Profiles, even if the
Xcode CODE_SIGN_STYLE attribute is set to Automatic.
Starting with Xcode 9, xcodebuild accepts a new
-allowProvisioningUpdates option.
When passed, xcodebuild will request a new provisioning profile
from Apple's servers for the current project and use it during
the build. The provisioning profile is only needed when building
for a real device, not the simulator.
When building an iOS project with qmake, the option is embedded in the
wrapping Makefile generated by qmake, so Qt Creator can simply call
make (which it does).
For CMake, there is no wrapping Makefile, so we need to pass the new
option explicitly as an additional build tool argument.
There might be cases where automatic provisioning is not desired,
which is why there is now a new checkbox in the CMake build step
configuration widget. It's default value is 'enabled', to match
qmake's behavior.
As an implementation detail, isiOS had to be moved to a header file so
it's accessible to both the build configuration and the build step.
Fixes: QTCREATORBUG-26246
Change-Id: Ic80cd965ba095d0ff379e13ad2ffb8c298c9f7c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Similar to the qmake make build step, so build issues are parsed for iOS
builds.
Task-number: QTCREATORBUG-26541
Change-Id: Ie71a3087feab2720f6d8b4974d221a70c3fe76fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The target list was recreated when the parsing of CMake project
finished.
But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.
Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This reverts commit 9dcbb8ca01.
Reason for revert: This workaround is not needed anymore, since
Qt 6.1.2 (see 71348437939e62b0e3b86888e966b300ff1e2855).
Change-Id: I089457dc58c5b97136b30190fdf17cfb303f8bd8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The command will be executed on the build device, from that perspective
the builddir is local.
Change-Id: I9b3bdf0333f2634caff352e8738019a86c09870c
Reviewed-by: David Schulz <david.schulz@qt.io>
The previous indirection was useful as long as they were overloads
for QProcessEnvironment and QStringList, but these are gone now.
Change-Id: I5066bd2e72fd06948a5cc7bbac6dda9006db96ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The "Current executable" target is an artificial target added by Qt
Creator, so we must not remove it because it is not one of the targets
from the project.
Amends dbb5a70f93
Fixes: QTCREATORBUG-24145
Change-Id: I4601bcbc7238c6bf54bc9aa3ef6eb934b65df96e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Testing with a hello project like this:
1. Go to settings select "hello" target, deselect "all"
2. Go to CMakeLists.txt and rename the hello target to hello2
3. Run CMake <-- important, this will rescan the file-api target structure
4. Build
Step 3 will notice that hello target is missing and remove it, since
no targets are there "all" will be inserted and step 4 will work.
Fixes: QTCREATORBUG-25477
Change-Id: I6a4461341550931006558e5fdecb5a4323afaf35
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In the build target list there is no reason to have <target>_autogen
or <target>_autogen_timestamps targets.
Also do not sort the target list, so that the special targets stay
at top (all, clean, install etc)
Change-Id: I3107150bb40d68cc95246d4d09abc300a6e3d3fc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.
Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.
Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When issuing cmake --build "." as an user I don't get to see which build
directory is being actually built.
To make things worse in project settings the build directory field is
disabled and cannot be copied.
Change-Id: Idf862ba1df68cde55e9785c934f67393da6c1616
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake has multi-config generators like:
* Visual Studio
* Xcode
* Ninja Multi-Config
The first two have different special targets for "all", "install",
"package", "test" namely: "ALL_BUILD", "INSTALL", "PACKAGE",
"RUN_TESTS".
All of them need to get the build type passed via "--config <build-
type>" and not via "CMAKE_BUILD_TYPE".
The multi-config generators will use only one build directory.
Fixes: QTCREATORBUG-24984
Change-Id: I8aa7ff73ce2af1e163b21a6504d26fcf95530edf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
After the previous changes it was only an empty wrapper around QWidget.
Change-Id: I58dcd82d8342c7de5e2df537044f6cf3de878a67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.
This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.
Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use the display name from the factory as default, override if needed.
Change-Id: I03519c998432fea4120b0de8b2fc2686644635f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Qt 6 CMake build doesn't execute prepare_apk_dir by default (this is
the equivalent of install step in qmake). Since we have the target
for installing the build artifacts to android-build already present
in the CMake targets list, it's better to just use it, instead of
using another custom step just for that.
Task-number: QTCREATORBUG-24679
Change-Id: I369d6ce513f9aaf917c5fcbb3f6aa44e36b97af8
Reviewed-by: hjk <hjk@qt.io>
- the var args template for addItems was overkill creating a lot of
instantiations. Use a temporary list instead.
- allow default constructed LayoutItems to be used for an empty cell,
avoiding the use of a QLabel with empty text
- add an addRow({...}) overload as convenience shortcut for
.startNewRow().addItems({...}
- rename startNewRow() to finishRow()
Change-Id: I6d49dacbac3d7acf140ca526884ba1ceeeca2e0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.
This is mostly mechanical, with various include/using changes
to make it compile.
Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
1. Systematically check for AbstractProcessStep::init() first in
derived classes.
2. Use setupProcessParameters(processParameters()); by default in
the base implementation.
3. Drop all re-implementations that are effectively the same.
Change-Id: I0ae54dd4909b354672a63ee56d0b7c2ea0732494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
- Store the selection of the "Current executable" target again
(broke apparently with 2c822ae3)
- Display the resolved target of the "Current executable" seletion
in the command line, instead of the fixed "
'<Current executable>' text
- Make the "Current executable" translatable
- Add a tooltip explaining what it is
- Use a Utils::TreeModel instead of a QStandardItemModel for the
target model
- As side-effect, searching in the target view using Ctrl-F seems
to magically work again.
Change-Id: Ia4d0913f6e586f49f74da66651a9177437dad6d9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
For convenience, and use it in some places.
Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
On all code paths, this was implicit in a ProcessParameters::setCommandLine()
which was on all code paths either called directly immediately before, or as
part of ProcessStep::setupProcessParameters().
With ProcessParameters::setCommandLine() as only user, this could be
inlined there. The effectiveWorkingDirectory() turned out to be out of
place and rather accidentally working there and was moved to
ProcessParameters::setWorkingDirectory().
Change-Id: I634f6086c2324e3cbecd3e5d50e22afc722abd3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This is actually a slight change in behavior insofar as
the summary now uses the same environment as the build
itself. This should not matter, or even be more correct.
Change-Id: I48e5be6cb7b97606f80f563ba399c4b6ff61c3bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Using a dedicated OutputLineParser ensures that we only ever see
complete lines and thus prevents "partially red" lines in the compile
output pane.
Fixes: QTCREATORBUG-24209
Change-Id: I12b3de70b81789afe727b66e366facdcc81f8ab8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Inject special targets like all, test and install into the list of
targets that get reported by CMake. This makes those available in
the locator again.
Task-number: QTCREATORBUG-24064
Change-Id: I08f1232d243afbe0800c1dc308a00917c98ccf8a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
CMake supports this for a while now.
As a side effect this fixes QTCREATORBUG-23738, which was caused by the
radio button hack used to show that only one item could be selected at
a time.
Change-Id: I18cbe6c5ee3872edaf74b9d828bde1ac5bf63563
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>