Commit Graph

8 Commits

Author SHA1 Message Date
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