Commit Graph

15 Commits

Author SHA1 Message Date
Sebastian Holtermann
18b0330b86 clang-tidy: Enable performance-inefficient-string-concatenation
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.

Closes: #19555
2019-08-05 17:21:00 +02:00
Brad King
22d3eb5d5e Refactor checks for whether a target has an import library
Use `HasImportLibrary` for such checks.
2019-07-12 17:29:40 -04:00
Brad King
71fbebd1dc IWYU: Fix handling of <memory> standard header
An old workaround for `std::allocator_traits<>::value_type` lints from
IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`.
Convert the workaround to use the same approach we already use for a
workaround of `std::__decay_and_strip<>::::__type` lints.  Then update
the `<memory>` inclusions to follow the now-correct IWYU lints.
2019-07-10 11:48:56 -04:00
Sebastian Holtermann
e0a8ff3148 cmPropertyMap: Use std::string as value container class 2019-06-08 12:25:35 +02:00
Sebastian Holtermann
026f65d284 cmPropertyMap: Add GetList method 2019-06-08 12:25:35 +02:00
Sebastian Holtermann
006229278b Use cmAppend to append ranges to std::vector instances 2019-05-23 16:19:49 +02:00
Sebastian Holtermann
6d407ae439 Use cmSourceFile::GetIsGenerated 2019-02-01 17:02:53 +01:00
Sebastian Holtermann
f16dfdf71f cmLocalGenerator: Simplify GetIncludeDirectories
This patch strips the `stripImplicitDirs` and `appendAllImplicitDirs`
parameters from the `cmLocalGenerator::GetIncludeDirectories` method and makes
it a wrapper into the new `cmLocalGenerator::GetIncludeDirectoriesImplicit`
method.  `cmLocalGenerator::GetIncludeDirectoriesImplicit` is the renamed old
implementation of `cmLocalGenerator::GetIncludeDirectories` and still
accepts `stripImplicitDirs` and `appendAllImplicitDirs`.

The motivation is that there's only *one* case where
`cmLocalGenerator::GetIncludeDirectories` is called with the
`stripImplicitDirs` parameter being `false` (QtAutoGen), but many other places
where it is called using the `true` default value.

QtAutoGen is modified to use `cmLocalGenerator::GetIncludeDirectoriesImplicit`
directly.  In two use cases of `cmLocalGenerator::GetIncludeDirectories`
the manually set `true` value for `stripImplicitDirs` is removed.
2019-01-28 08:41:28 -05:00
Regina Pfeifer
ef61997b1b clang-tidy: Use emplace 2019-01-17 13:12:02 -05:00
Brad King
cd0881be61 IWYU: Update CMake code for IWYU built with Clang 6
IWYU now correctly requires `<utility>` for `std::move`.  It also
requires a container header when used via a range-based for loop.
2019-01-15 10:00:50 -05:00
Kyle Edwards
c150bf087c Server mode: Fix regression of hasInstallRule
The introduction of policy CMP0082, to run subdirectory install
rules in the correct order, caused a regression in server mode
where any directory with a subdirectory is marked as having an
install rule even if no "real" install rules are present. This
change fixes this regression for server mode.
2018-12-12 10:29:50 -05:00
Regina Pfeifer
3e60580784 clang-tidy: Fix readability-static-accessed-through-instance
Enable the check in .clang-tidy and fix all warnings.
2018-11-22 00:11:37 +01:00
Brad King
284a38e42f cmake-server: Revert "Support codemodel filegroups for INTERFACE_SOURCES"
Revert commit v3.13.0-rc1~144^2 (cmake-server: Support codemodel
filegroups for INTERFACE_SOURCES, 2018-08-10).  The changes activate
code paths not meant to be used with interface libraries.  Another
approach will be needed to expose this information later.

This revert has to be done by hand because the code in question has been
changed somewhat since the changes were made, and was also factored out
to another source file.

Fixes: #18463
2018-10-17 14:02:39 -04:00
Brad King
72b4c2c48a server: Compile json object generation source separately
Declare entry points in a dedicated header and compile the source
separately instead of including it in the server implementation.
2018-09-21 11:39:59 -04:00
Brad King
85be67217b server: Split json object generation into separate source
For now just move the content and `#include` it back in to the original
translation unit.  That way `git blame` can cleanly track the original
lines.
2018-09-21 11:39:21 -04:00