Commit Graph

16 Commits

Author SHA1 Message Date
Cristian Adam
f90f60bb32 CMake: Fix QTC_STATIC_BUILD
Change-Id: Idfcd36f2d5fdaf09c958ff101aa5e83e0a29cb58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-10 10:11:18 +00:00
Eike Ziller
6c9d4a60e0 Update yaml-cpp to 0.8.0
With removal of unneeded files similar to the original import,
the patch in patches/0001-... generated with

    git format-patch -D HEAD~1

to show just the removed files.

Change-Id: Ibfe64439bae5d1b1baa6b6bc47caf1ae030b3f9d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-28 06:29:55 +00:00
Eike Ziller
170f9acfb4 ClangTools: Add support for yaml-cpp 0.8
They renamed their target from `yaml-cpp`
to `yaml-cpp::yaml-cpp`

Still support < 0.8 though.

Fixes: QTCREATORBUG-29537
Change-Id: Iafa6e75998f0120610542b4c744b205aee3392a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-25 09:21:42 +00:00
Orgad Shaneh
3d8b46685a MSVC: Enable exception handling for libs that use STL streams
Sample warning:
Building CXX object src\libs\qtcreatorcdbext\CMakeFiles\qtcreatorcdbext.dir\common.cpp.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(342): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(335): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned long)'
F:\Projects\qt-creator\qt-creator\src\libs\qtcreatorcdbext\common.cpp(20): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned long)' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\sstream(655): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled

Change-Id: I26508048a875aabe4c5b80ef4cccfe091a2a145e
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 09:29:28 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
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>
2022-04-29 07:16:53 +00:00
Cristian Adam
323567e64a CMake: Skip AUTOMOC and AUTOUIC for Googletest and Yaml-cpp
These libraries do not use any Qt related technologies, no need
to have automoc and autouic enabled.

Change-Id: I294a989c200bc8ec937f8aa780ef20a5882e5a56
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-12-14 09:53:58 +00:00
BogDan Vatra
187f0f21eb Fix get_filename_component usage
get_filename_component called with incorrect number of arguments

Change-Id: I4f1c8dbc185c2e53bc596bf02a48f72b76ac6955
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-08 11:45:54 +00:00
Eike Ziller
487e4a2e51 unittest: Add missing tests (QmlDesigner, ClangTools and a few others)
Ups it to 2487 tests from 110 test suites.
(from 1963 tests from 91 test suites)

Change-Id: Id601bc8bbd43f129956be812e30a94081098c3cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-17 14:44:20 +00:00
Eike Ziller
dc297f09b0 cmake build: Fix configuration for BUILD_LIBRARIES_BY_DEFAULT=OFF
Or BUILD_LIBRARY_YAML-CPP=OFF.
In that case the add_qtc_library does not result in a target, so
we must check before accessing it, and should not claim that yaml-cpp
is available if it isn't.

Change-Id: I710ce726d65f7a1c036fd94ebeb18ead290a45f2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-15 12:59:04 +00:00
Orgad Shaneh
d0df1527a6 yaml-cpp: Fix/suppress MSVC warnings
* C4251: 'YAML::Binary::m_data': class 'std::vector<unsigned char,std::allocator<unsigned char>>'
  needs to have dll-interface to be used by clients of class 'YAML::Binary'
* C4275: non dll-interface class 'std::runtime_error' used as base for
  dll-interface class 'YAML::Exception'
* STL4015: The std::iterator class template (used as a base class to provide
  typedefs) is deprecated in C++17.

Change-Id: I37e32df84ee2d2946181aad790dabd0c3ed58c08
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-12 14:01:10 +00:00
Eike Ziller
a065175d58 CMake build: Fix configuring with CMake 3.10 and external yaml-cpp
CMake 3.10 does not allow using target_include_directories with
INTERFACE on imported targets.

https://gitlab.kitware.com/cmake/cmake/-/issues/15689

Fixes: QTCREATORBUG-24356
Change-Id: I2427276f0851010cda2321c45eff0628713af2ff
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-17 06:34:35 +00:00
Cristian Adam
18386c7117 CMake Build: Fix yaml-cpp include directory detection
On Ubuntu 19.10 the libyaml-cpp-dev CMake config module has a broken
value for YAML_CPP_INCLUDE_DIR.

Change-Id: I5097ef656b988dda0326a15b521b92cbbdb0a390
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-02-26 17:47:29 +00:00
Cristian Adam
24da5b14d4 CMake Build: Fix include directory for external yaml-cpp
On Linux one gets:
/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/../../../../include
which fails to compile.

Resolve the path so CMake can detect/remove the duplicate to fix this.

Change-Id: I4987c8edd99e60d31beb2d5075a949090996bc3a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-11 06:11:21 +00:00
Eike Ziller
b9a0c3ce99 ClangTools/cmake build: Fix build against external yaml-cpp
For some reason that doesn't set INTERFACE include directories,
so do it manually.

Change-Id: I3451252ff8c0651dc1dd13c8ffa7c0e3c952e732
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-09-10 08:07:05 +00:00
Nikolai Kosjar
e6d16b6747 ClangTools: Support loading exported diagnostics
Add a new toolbar button to load diagnostics exported with

   $ clang-tidy -export-fixes=/path/to/file
   $ clazy-standalone -export-fixes=/path/to/file (master version)

Change-Id: I8316fe0706a18222e68220ef4fbfdc7ae8d09804
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-03 09:39:48 +00:00
Nikolai Kosjar
0ba729e527 Import YAML-Parser yaml-cpp
Version: tags/yaml-cpp-0.6.2
  License: MIT

yaml-cpp requires c++11 and since yaml-cpp 0.6 there is no dependency on
boost anymore.

A YAML parser is needed for the ClangTools plugin to parse exported
diagnostics from clang-tidy/clazy:

  $ clang-tidy -export-fixes=/tmp/tidy.yaml source.cpp

The imported source is stripped of unneeded files as documented with

  src/libs/3rdparty/yaml-cpp/patches/0001-yaml-cpp-Strip-unneeded-sources.patch
  (generated with "git format-patch -D")

Change-Id: Ib0a521b5aff4b1cd058eb480bfb99fde4b320dc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:42:22 +00:00