Adding qtc_enable_sanitize to add_qtc_executable to also instrument applications
Changing qtc_enable_sanitize to use target_compile_options instead of trying
to modify CMAKE_CXX_FLAGS_DEBUG and hoping that nobody else overwrites it,
which previously erased the added flags.
Adds support for MSVC /fsanitize
Change-Id: Ida80cfd7ef7ea91b2d6473fdc047cb7132cdfec6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
For now just run them without failing the precheck on failing tests.
The test results are only visible in the precheck details
on testresults.qt.io
Remove the fixed timeout of 5 seconds, since this depends on the test
setup where the tests are run, and it is not possible to override a
fixed timeout with the --timeout option of ctest.
Change-Id: Ib5f12092b64d0cf87e1213b031e1990973e18669
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
get_property fails if the target does not exist, and _dep stays at some
old value.
This leads to a) a lot of cmake backtraces with an error message that
doesn't add anything useful, and b) an endless loop in
find_dependent_plugins. Which in the end leads to 500.000 lines of
useless CMake output, repeating
"qtcreator/cmake/QtCreatorAPIInternal.cmake:340 (find_dependent_plugins)"
Skip get_property if the target doesn't exist.
Change-Id: Ic694bc05b3dce5b83220a2f5dab8f063ef692c12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.
Fixes some symbol clashes when all plugins are linked into the same
executable.
Support for actually loading static plugins will be added in a separate
commit.
The feature is controlled by QTC_STATIC_BUILD which by default is OFF.
Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Amends 46f6c5d005
Simply disable this safe-guard for < 3.18.
Change-Id: I0ae3b7520a913861c8c9f97ec7e01e5c9c00d362
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The ELF default is historical legacy. We should always require all
libraries and all plugins to link to their dependencies and not
accidentally forget something (like implementing a virtual function).
Change-Id: I5e00996d7f4b4a10bc98fffd1629f8bfcf0d1c8f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
CMake 3.16 is available on the major Linux distributions nowadays,
so we can get rid of some workarounds.
Change-Id: I32500375748f33c3e40fbd7a08824d823f817a8f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This was needed in the early days of the CMake port when the list of
source files would change due to being added to the qmake project
files.
Change-Id: I7afd219b24ab7a0d87fce26ba35dac75cf8caa5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The named option is BUILD_LINK_WITH_QT, which when set to ON will
generate the QtCreator.ini file needed for Qt Creator to find the
installed Qt.
Change-Id: If3a47a463510fbfc90a314829378c6c4e505d2f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Even in the debug build, as done for the qmake build system. This is for
performance optimization of this critical part for C++ parsing even in
debug / developer builds.
Change-Id: I9552ba9fc44e213f2df1d2d2a64a126af3603fd1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
- there is no reason for putting them elsewhere
- since CMake file-api only reports the .lib location for linked
libraries, Qt Creator has difficulties with adding the correct
PATH for running e.g. manual tests, when the .lib files are at
an arbitrary location
Fixes: QTCREATORBUG-25684
Change-Id: I24b26a79c70fd5384f534f8f0b66b51fca1ecc56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
sccache does not support the "/Zi /FS" option for debug information
with MSVC. Optionally replace "/Zi" by "/Z7", which leaves debug
information in the object files and only collects it at link time.
See also qtbase 2354274f39934b94383923834479901106489def.
Change-Id: Id94c2116f3c4192556dbdf8fe82b12ce0a204273
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
On Linux (and Windows) we should not create toplevel files (README.md
etc) or directories (doc/, scripts/ etc).
On macOS, move the whole Devel package contents into the app bundle,
because that is installed toplevel in the Qt installers, and we
shouldn't even create include/, lib/ or any other directory at the
toplevel at all.
Since the prefix path must now point to the Resources folder inside the
app bundle, adapt build_plugin.py to also accept --qtc-path pointing to
the app bundle (Qt Creator.app) itself, and also to the app bundles
parent directory. Adapt the Qt Creator plugin project template
similarly.
Task-number: QTCREATORBUG-25414
Fixes: QTCREATORBUG-25415
Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Allows e.g. distributions to adapt to system layout.
Fixes: QTCREATORBUG-25142
Change-Id: Ia6d759514fef5a154334bc3d7221ea4b970122f2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Was not able to build something against these libraries
from another "cmake project".
Change-Id: I3876d102a320b4f5324e25fd8e840c181010c2a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
- fix target name
- build pchs without extensions like all other targets
- require CMake 3.10 for plugins
Amends c038abb0ab
Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Make sure that every project will have its own precompile headers
sets.
This fixes problems with MSVC.
Change-Id: I37d58c9652f679545283907e7cad70cd579911a8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The cmake build used IDE_ID in too many paths that are actually
not branded (yet?).
Change-Id: I019dd806975ef2205aa946bc3b27b0675233e1ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The public header "textdocumentlayout.h" includes "State" from
KSyntaxHighlighting, so we need to export that.
Since it doesn't have the ".h" extension, it doesn't get exported
automatically either. Add a generic function for adding such special
public header files.
Fixes: QTCREATORBUG-24413
Change-Id: I841e6d601df7e925f48eedcc2a28d6b43c00350e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
when configuring a minimal build make sure that when querying
for target properties like SOURCE_DIR the target actually exists.
Change-Id: Ib754b79be6461e3ddd4cdeb1abac123cf4535068
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- Make the build system aware that empty_pch.c/.cpp are generated files
to prevent invalid access from _add_pch_target.
- Force the creation of the translation output directory before copying
qm files into it.
Change-Id: Iaff5e5ebdbfec7e89a47d277d95f9dec760a5b6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
They take much longer, but are also optional.
Makes it possible to run via e.g. "ctest -V -R tst_debugger_dumpers"
Change-Id: I8bbda6ca36e25cd896b1f3be5d1696a27b8acc53
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Also add a extend_qtc_test which checks if the test is known.
Change-Id: Idd3b3a02ac61fce2622cb8681233cfbd96a77bc4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>