Commit Graph

31 Commits

Author SHA1 Message Date
Eike Ziller
14caa65f14 CMake build: Stop looking for QtScript
It is no longer used.
Amends 7a3f5edfaf

Change-Id: Id76d05a303179f071cdc334dd0f1e7041b7eaa92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-19 10:40:36 +00:00
Eike Ziller
3d80fb5872 CMake build: Add feature info for building tests
Was wondering if my current build included tests or not...

Change-Id: I17030455ffd89d6b482e8cc08da3cb3b2dcbbe35
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-04 14:07:54 +00:00
Volodymyr Zibarov
28a999be52 CMake Build: Set /permissive- (standards conformance mode) for MSVC
To make errors appear faster when developing on Windows

MSVC 2017 and later have this flag to disallow MSVC-specific C++
language extensions. Use it to make code more correct and more portable.

Set this option with add_compile_options() in root CMakeLists.txt to
apply it to all targets.

Add one #include to unittest/gtest-clang-printing.cpp as workaround for
forward template declaration bug in MSVC http://tiny.cc/fa4tpz

Change-Id: Ie0b19701ad773c79ffd2fed24fffbb1dcb29538c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-29 06:51:45 +00:00
Cristian Adam
a81b6b623e CMake Build: Update CMake minimum Version to 3.10
This is due to policy CMP0071 which affects AUTOMOC and
generated files.

With CMP0071 set to OLD (CMake 3.9) precompiled headers
would fail to work with GCC.

GCC and precompiled headers would still require the upcoming
3.18 CMake, but having CMP0071 set to NEW (CMake 3.10) is
a prerequisite.

Change-Id: I7c3c1f739877646a91ffa07e2a8006ab7d6f4d77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-26 11:41:44 +00:00
Eike Ziller
b3ffd8d1eb CMake build: Move documentation functions to re-usable location
Removes "install_..._docs" and "clean_docs" special targets.
Instead install documentation with "--install . --component qch_docs"
and "--install . --component html_docs" which have the advantage that
the install prefix can be specified later on with --prefix.
Also removes export of IDE_SOURCE_DIR, which is not used.

Change-Id: I4fce0b9aa8c7fc40b7e94e065777ddf4c0b76c41
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-25 11:31:06 +00:00
Eike Ziller
cc04c8d8e4 CMake build: Make translation function available to external plugins
And fix that the "ts_all" target did not get the custom target prefix.

Change-Id: Iff6a5e328456f3d949c31f2e41b48c400fad773c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-05-05 09:48:31 +00:00
Eike Ziller
9eceb46739 Fix link on commit sha in about dialog
Passing a URL via defines breaks when trying to "stringify" it.
It would always stop at the first slash.
Instead use a qmake variable directly. That has the additional advantage that
the value isn't passed on each and every compiler command line.

Change-Id: I97a297fbcdee5ea03eb6fa08181c95b1ad2de767
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-03-23 07:14:27 +00:00
Alessandro Portale
1a0af1ca22 CMake Build: Let the version dialog log link point to the repo of origin
https://github.com/<qtcreator-fork>/commits/<sha>

Instead of expecting a "%1" placeholder in the passed-in
IDE_REVISION_URL_STR, we now expect IDE_REVISION_URL_STR to be a plain
URL.

Reason is that passing a string containing "%1" from CMake to the
VersionDialog caused a premature replacement of that placeholder
somewhere on the way.

Also log the CMake configure call in build_cmake.yml

Change-Id: I4c1a946c66f891101576e3556ca87a004cead950
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-10 12:09:18 +00:00
Cristian Adam
8d767a3a21 CMake Deployment: Remove Dependencies component
- Install will also copy the dependencies.
- Made the dependencies search recursive, not just two steps
- Moved install code to a script, not having to escape quotes and dollars

Change-Id: I6c5fb19e4094e9dcd4b339d5b90be6e7c5055223
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-06 18:03:33 +00:00
Cristian Adam
e6e0b0ca3b CMake Build: add perfparser
Change-Id: Ib16548befefbb827f2752300f9e67da3cf91570c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-28 14:18:19 +00:00
Eike Ziller
92546d0983 Merge remote-tracking branch 'origin/4.11'
Change-Id: I0657cee6b87eea7b3178548bebed85d5ac824519
2020-01-03 08:57:33 +01:00
David Schulz
8f9ff0c640 CMake build: disable some warnings for build against llvm
Add the same ignore warning flags to the compiler as in
clang_installation.pri

Change-Id: Ieb3f6ac861cba60b6c7fb3c74e4c9b46a62d22b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-12-19 13:02:29 +00:00
Tobias Hunger
b0fb6537f9 CMake: Do not require Qt LinguistTools
They are only used optionally for the translations, so there is
no need to require those.

Change-Id: I9f84e0d62f7075394e9f260c11746e4327e60995
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-11-13 16:08:41 +00:00
Cristian Adam
87023db572 CMake Build: Properly build qtcreatorcdbext
Change-Id: I8b4a58d79124debd877442fe23798c77bff723c5
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-10-08 13:26:53 +00:00
Eike Ziller
ac014e3875 Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
	src/plugins/projectexplorer/projectnodes.h

Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
2019-10-02 07:32:57 +02:00
Alexander Akulich
0907bc8658 CMake Build: Fix LLVM lookup for cases when many versions available
If calling both find_package(Clang) and find_package(LLVM), call
find_package(Clang) first to get the currently active Clang version
by default with a consistent version of LLVM.

(Similar to the FindPythonInterp/PythonLibs ordering)

Change-Id: Ib6da04e0fb0ffc1fe67a8eafb0c5f04abbb36b6c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-10-01 14:31:30 +00:00
Cristian Adam
f88ad0e9d0 CMake Build: Allow building with Qt5 and Qt6
Emulate Qt5's functions/targets with Qt6 equivalents.

Change-Id: I6bfc5c8a649f0ddc5f1117bc5b2d0f41cb72c821
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-09-24 16:05:23 +00:00
Tobias Hunger
c3f31b6332 CMake: Handle translations
(Optionally) re-generate .ts files from CMake by running lupdate and
run lrelease to generate .qm files.

Changes to qmake:

* src/libs/3rdparty/syntax-highlighting/src/cli/kate-syntax-highlighter.cpp
  is no longer translated: It's a command line tool that is not used by creator
* src/libs/aggregation/examples/text/main.cpp is no longer included in ts files
* src/libs/qt-breakpad/qtcrashhandler/* is no longer included in ts files:
  It is not built right now

Change-Id: Iec018da86a111a68ec983a880cef2961b48ccdf9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-17 12:37:14 +00:00
Cristian Adam
ab9aae4856 CMake build: Build with PCH
This commit enables building with upstream CMake PCH support.

Change-Id: Ib37745b00e7560e804483e7c2c2a3fa7cf6d663c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-14 13:40:48 +00:00
Cristian Adam
8ae9cfe39d CMake build: Add "Devel" package
The "Devel" package will contain headers, libraries, documentation
needed by the 3rd parties to build Qt Creator plugins.

Fixes: QTCREATORBUG-22514
Change-Id: If54929f823982b921b98a63ff6085d53618a3a49
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-25 14:06:46 +00:00
Eike Ziller
f4acc2f162 CMake build: Allow branding
Create your own QtCreatorIDEBranding.cmake somewhere and point cmake to
it via CMAKE_MODULE_PATH

Task-number: QTCREATORBUG-22488
Change-Id: Ic1057d879c5104b57e4ed8ef8a9c4fc8d4140de9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-21 13:30:04 +00:00
Eike Ziller
a47975b8fa CMake build: Do not write versions etc into the cache
The user is not supposed to change these via configuration.
If they are written to the cache, version bumps do not take effect
automatically, resulting in quite some hassle.

Change-Id: Ibaf9dba02114da1cbc3ec2210ae7c3328f35bb1f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-21 13:29:56 +00:00
Eike Ziller
bd3037464e Bump version
Change-Id: I5d2298e71837e3c146196f75a9bd1472771f1949
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-20 12:05:00 +00:00
Cristian Adam
dfe38f79c3 CMake build: Ensure compilation when Qt5::Script is missing
The Qt5 Visual C++ 2017 64 bit installation doesn't come with Qt5::Script
target by default.

This patch ensures that Qt Creator can be built with the above Qt5 scenario.

Change-Id: Ibe35e9d879ccd51012f53acebfbb7461fd773d4a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-06-03 11:49:13 +00:00
Tobias Hunger
d70d58b5cc CMake: Add Threads::Threads as public dependency to clangrefactoringbackend library
Change-Id: If7d3d4a7226f034d0e4c66726d3a7beed3480efe
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-03 09:27:51 +00:00
Eike Ziller
d492d14a92 CMake build/macOS: Add iostool
Task-number: QTCREATORBUG-22475
Change-Id: Ifd9a9dc1483d223c446fd25a45e3cd1778bc94d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:15:19 +00:00
Eike Ziller
52d48c75ae CMake build/macOS: Centrally detect system libraries
And realize that at most places (except native help viewer) the code
using them is not optional on macOS.

Change-Id: I308406a0e8f176dad4151d23a33cd3fc0fb8635c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:04:15 +00:00
Tobias Hunger
e3df930886 CMake: add docs, clean_docs and install_docs targets
Change-Id: Ic9883f0fc8c85db4573e751261cf347e56777a3a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-21 09:56:49 +00:00
Tobias Hunger
5da2b6edc7 CMake: Get information from qmake
Get information that is not available via cmake from qmake.

Change-Id: Ib80cd472bcb5ea831991de5fcbcb7e2400a1ce10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-21 09:56:44 +00:00
Eike Ziller
fc04ec1c3e CMake build / macOS: Fix Info.plist
Change-Id: I160c9efd10e62b7e17957117daed376d2ce70601
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2019-05-20 12:28:36 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00