*** This removes support for CMake < 3.7 ***
Change-Id: Iddb0bab1a61b814adb4cb7ffa217284e96cb1140
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Snap packages apparently work by sym-linking the cmake binary to snap.
So keep the sym-link if it points to a file called "snap" on Linux.
Task-number: QTCREATORBUG-23376
Change-Id: I065457c26b32a191760e8dda1ef1bdc7a79712ad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Do no mark the CMake tool as invalid when it times out when fetching
auto-completion information. This happens the first time a CMakeLists.txt
file is edited in Creator.
Also increase the timeout so that there is less of a chance
to trigger have the information retrival time out -- which breaks
auto-completion of cmake variables, etc. in the CMakeLists.txt editor.
Closes: QTCREATORBUG-18530
Change-Id: I914377a6ece90c6f78ea5eb007da8fbe07785563
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Have UI to select a .qch file location in CMake Tool setup
* Auto-detect CMake's .qch file in its default location (relative
to the cmake executable)
* Register the .qch files with the HelpManager
Task-number: QTCREATORBUG-21338
Change-Id: I4057eec42c39535012d9f0daf788fc62ef20d544
Reviewed-by: hjk <hjk@qt.io>
Run CMake less often to extract information on the CMake tool.
Change-Id: I959df99fee16e6196db61c84aee7908d66af222d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We may neither run "/some/path/CMake.app" nor
"/some/path/CMake.app/Contents/MacOS/CMake",
so add a missing workaround for the latter, and use the "resolved"
executable path for the retrieval of version info and capabilities.
Change-Id: I6fed8cc478c0d0b9946a934fd83126e157bde992
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Running CMake via a non-canonical path (including '..' in the path, or
via a symlink) can result in funny errors.
de6faa0f15 added a warning for that
condition. Unfortunately the auto-detection of CMake can return a path
to a symlink (e.g. for CMake from brew on macOS). Also it is helpful to
use a symlink to e.g. manage different CMake versions.
Instead of warning about the condition, and forcing the user to resolve
it manually, simply run CMake via its canonical path when actually
running it from Qt Creator.
Change-Id: I95623b45c5436a6d61c1419b7aba23e2a73a0650
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Warn when cmake is configured to use a non-canonical path. This might
trigger problems in CMake itself.
Show this warning in the Kit as well as in the CMake options page.
Also complain other issues in the CMake options page.
Task-number: QTCREATORBUG-22583
Change-Id: I841341db8305f9152543487ce9ceeab2eca0b2b9
Reviewed-by: hjk <hjk@qt.io>
Fix fileApi detection: It returns a list of versions in -E capabilities
output, not just one version.
Change-Id: I94a59806f3c4577b01342cae6f05cdc8385131a8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
... and use the result of the expression, which was previously computed
but not used.
Change-Id: Ic995d2842e71bf57ea404494e3586205a0c154e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Add an option to override the cmake reader type that is going to
be used.
By default the reader type is "auto" for autodetection, but that can
get changed in the cmaketools.xml settings file. Other supported options
are "tealeaf", "servermode" or "fileapi" and that will force that reader.
You can also set QTC_CMAKE_IGNORE_FILEAPI=1 in your environment to force
creator to ignore the existence of fileapi support in all cmake tools.
Change-Id: I2006616312090ce2909154dc1966f7a8eaa2949a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake rejected a patch to add fileapi detection via cmake -E capabilities
output and asked to base the detection on the version number. This decision
has been revisited now and starting with cmake 3.15 the supported fileapi
object kinds and there version are reported.
Update Creator to use this information and to fill in the missing data for
cmake 3.14.
Change-Id: I382310a098925491921acf1b59099bbe0859cde2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Detect whether cmake supports fileapi or not. This is based on the
version number since cmake upstream does not want to add a flag into
the capabilities output:-/
Change-Id: I036adf65cbd1b171f0f98a7c86230a7ca33fff32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Add an option to CMakeTools to force auto-creation of build directories.
This does lead to cmake cluttering up the file system with directories, but
does not force users to go through the oftentimes long configuration process
twice (once in a temporary directory and once in the real location).
Task-number: QTCREATORBUG-16794
Change-Id: I68d92fc58638ad0a0a7622b7ef1621e055c9f2a7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
No need to pass in the complete kit. Remove a couple of unnecessary
namespace names.
Change-Id: I2ac895535a80b4a54a423ce62dbdede65b67437b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Makes for way more robust (and featureful) generator discovery.
Change-Id: I7df837500e1c3a200960e9d157b5c105dacd4068
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Allow to select generator and extragenerator in a nicer way.
Enable support for platforms and toolsets.
Change-Id: I0c9aae635cdca0ec1db7f285e9cb2785172ed338
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Work around a bug in the documentation of CMAKE_COMPILER_IS_GNU*, which
leads to creator offering invalid completion when editing CMakeLists.txt
files.
Task-number: QTCREATORBUG-16852
Change-Id: I7c61445a7448bdd6f5de5f235316c260ba28e757
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Users tend to select cmake.app, which is actually a GUI for cmake and
not what Creator expects. So check for the proper binary in the bundle
and return that if it exists.
Change-Id: I1668baa6236ee4ae88da200cef257b636f7a9e72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.
This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).
Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.
Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run.
This avoid nested event loops which can produce really strange crashes
if not use carefully.
This patch only converts those processes that have a timeout of less
than 5 seconds or use the default timeout.
Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Do not run cmake 5 times during startup. Delay that as far as possible.
Also add a supportedGenerators() method while visiting the code anyway.
Fix up and simplify the other cmake help output parsers.
Change-Id: I6622d552ffe559bf099b4b278618676a045e350e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>