19 Commits

Author SHA1 Message Date
Sebastian Holtermann
aaf59120bf Source sweep: Replace cmExpandList with the shorter cmExpandedList
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
2019-08-23 17:07:49 +02:00
Sebastian Holtermann
9b334397f5 Source sweep: Use cmStrCat for string concatenation
This patch is generated by a python script that uses regular expressions to
search for string concatenation patterns of the kind

```
std::string str = <ARG0>;
str += <ARG1>;
str += <ARG2>;
...
```

and replaces them with a single `cmStrCat` call

```
std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
```

If any `<ARGX>` is itself a concatenated string of the kind

```
a + b + c + ...;
```

then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.

If there's a sequence of literals in the `<ARGX>`, then all literals in the
sequence are concatenated and merged into a single literal argument for
the `cmStrCat` call.

Single character strings are converted to single char arguments for
the `cmStrCat` call.

`std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
because it supports numeric types as well as string types.

`arg.substr(x)` arguments to `cmStrCat` are replaced with
`cm::string_view(arg).substr(x)`
2019-08-22 16:38:10 +02:00
Regina Pfeifer
2dfc52675c cmAlgorithms: Add cmContains
Also, use the new function where applicable.
2019-08-19 20:01:39 +02:00
Sebastian Holtermann
f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument 2019-08-14 16:33:20 +02:00
Harry Mallon
40be48f890 XCode: Add scheme option XCODE_SCHEME_DEBUG_AS_ROOT 2019-03-11 13:30:35 +00:00
Regina Pfeifer
5a0784ddea clang-tidy: Pass by value 2019-01-22 13:03:04 -05:00
Brad King
cb6229b8b8 clang-tidy: fix warnings in macOS-only code 2018-11-27 13:20:34 -05:00
Gregor Jasny
6b7f1e1db0 Xcode: Add variables and properties to configure schemes
Add `XCODE_SCHEME_*` target properties and associated variables
`CMAKE_XCODE_SCHEME_*` to initialize them on target creation.
Map each target property value to an associated Xcode scheme entry.

Co-Author: Martin Sander <mail@martin-sander.de>
Fixes: #17919
2018-08-01 09:12:42 -04:00
Matthias Maennich
77f674be35 Fix some occurrences of readability-braces-around-statements
Fix issues diagnosed by clang-tidy [readability-braces-around-statements]

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:43 -04:00
Matthias Maennich
f0bab294dc Convert some leftover loops to C++11 range-based loop
Fix issues diagnosed by clang-tidy [modern-loop-convert]

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:43 -04:00
Matthias Maennich
bb0ad1bea8 Fix some occurrences using string by value rather than by const&
Fix issues diagnosed by clang-tidy
 - performance-unnecessary-value-param
 - performance-unnecessary-copy-initialization

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:40 -04:00
Matthias Maennich
8cc33aeaec Replace several occurrences of empty string comparisons by string::empty()
Fix issues diagnosed by clang-tidy [readability-container-size-empty]

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:40 -04:00
Gregor Jasny
fe34a5c82b Xcode: Add XCTest support to schema generator
Closes: #16961
2017-06-28 22:21:52 +02:00
Gregor Jasny
690cf2c1b2 Xcode: Prepare schema generator for XCTest
Issue: #16961
2017-06-28 22:06:49 +02:00
Gregor Jasny
54a48c6781 Xcode: Use proper buildable name for schema 2017-02-28 22:38:30 +01:00
Gregor Jasny
f4977d056b Xcode: Select executable target for execution in schema 2017-02-28 22:38:29 +01:00
Gregor Jasny
7202db5db4 Xcode: Fix schema container location calculation 2017-02-28 22:38:29 +01:00
Gregor Jasny
6a54d28e44 Xcode: Use proper indentation for schemes 2017-02-28 22:27:21 +01:00
Gusts Kaksis
ffb8817b37 Xcode: Write shared schemes based on the default files generated by Xcode
Issue: #15441
2017-02-28 09:21:54 -05:00