| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|
|
|
| |
Fixes: #16365
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
ce0b983216 target_compile_options: Add syntax to specify shell strings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1841
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Options specified via `COMPILE_OPTIONS` and `INTERFACE_COMPILE_OPTIONS`
are deduplicated, but individual options can legitimately be duplicated
when grouped with other options, e.g.
-D A -D B
After deduplication that becomes `-D A B`. Therefore we need a way to
treat groups of options as units during deduplication. A simple approach
is to specify each group as one option, e.g.
"-D A" "-D B"
However, that conflicts with options that legitimately have spaces. To
break this ambiguity, add a `SHELL:` prefix syntax to specify that an
option should be parsed like shell command line arguments after
deduplication, e.g.
"SHELL:-D A" "SHELL:-D B"
These will survive deduplication intact, and then be parsed to produce
`-D A -D B` on the final command line.
Fixes: #15826
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1b5e52fd65 Genex: Fix COMPILE_LANGUAGE propagation through try_compile
2deb9b7f34 Genex: Fix COMPILE_LANGUAGE in SYSTEM include directories
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1844
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When evaluating `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`, or evaluating
`INTERFACE_INCLUDE_DIRECTORIES` on an imported target, thread the
compile language through to the generator expression evaluator so
that it can support `$<COMPILE_LANGUAGE:...>`.
Fixes: #17811
|
| |/
|/|
| |
| |
| |
| |
| | |
Use `CMAKE_IMPORT_LIBRARY_SUFFIX` to identify platforms that have DLL
import libraries rather than memorizing a list of platform names.
Fixes: #16801
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
7776ce98c3 Tests: Add cases for usage requirements of linked object libs
bafe655b11 Help: Document linking behavior of OBJECT libraries
57538224d0 objlib: Link object-files from `OBJECT` libraries.
9a7f039ee7 objlib: Allow `OBJECT` libraries to link to `OBJECT` libraries.
dfb6e84082 objlib: Allow other libraries to link to `OBJECT` libraries.
51249e69ea objlib: Allow `OBJECT` libraries to link to other libraries.
e22c45d4c9 Tests: Teach RunCMake to ignore AIX ld warnings about GNU atexit
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Acked-by: John Drouhard <john@jmdtech.org>
Merge-request: !1524
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note: This finally links the object-files of the `OBJECT` library from
the right-hand side of `target_link_libraries` to the target on the
left-hand side. However, this will only happen with directly linked
`OBJECT` libraries, not with `OBJECT` libraries "linked" through
property `INTERFACE_LINK_LIBRARIES` of a target on the right-hand side!
Fixes: #14778
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note: This still does not link the object-files of the `OBJECT` library
from the right-hand side of `target_link_libraries` to the target on the
left-hand side. (In this particular case of another `OBJECT` library on
the left-hand side this would not make any sense anyway. The target on
the left-hand side has no link-step.)
Issue: #14778
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Note: This only allows `OBJECT` libraries to be on the right-hand side
of `target_link_libraries` but still does not link its object-files to
the target on the left-hand side.
Issue: #14778
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our `cmake -E __create_def` helper used for `WINDOWS_EXPORT_ALL_SYMBOLS`
and merging of multiple `.def` files is available only with CMake hosted
on Windows. However, we may generate use of it on other platforms since
commit v3.9.0-rc1~405^2 (Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def`
files, 2017-03-13) when multiple `.def` files are listed. This results
in a build error because the tool doesn't exist.
Fix our logic to avoid using the tool on non-Windows platforms. Instead
silently ignore all but the first `.def` source as we did before.
Issue: #17773
|
|\
| |
| |
| |
| |
| |
| | |
653b8946 Reduce raw string pointers usage.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1729
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|/ |
|
|
|
|
|
| |
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
|
|\
| |
| |
| |
| |
| |
| |
| | |
4017bf40 Darwin: Emit deployment target that matches the SDK
8f4663ff Xcode: rename embedded SDK query function
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1447
|
| | |
|
|/
|
|
| |
Some are user-facing. Others are source comments.
|
| |
|
|
|
|
| |
explicitLibraries can never be nullptr at this point
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
| |
|
|
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
|\
| |
| |
| |
| |
| |
| | |
068cc545 Genex: Fix TARGET_PROPERTY value of SOURCES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1218
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactoring in commit v3.8.0-rc1~445^2~2 (cmTarget: Move sanity checks
and computed property access to callers, 2016-10-13) exposed a typo in
commit v3.8.0-rc1~445^2~3 (cmGeneratorTarget: Implement
cmTargetPropertyComputer interface, 2016-10-13). Together they broke
the `$<TARGET_PROPERTY:mytgt,SOURCES>` generator expression in the case
that the `SOURCES` target property is populated in part by the
`target_sources` command. Add the missing `;`-separator.
Fixes: #17243
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds cmGeneratorTarget::clearSourcesCache() which clears the cache
of precomputed sources lists and object names. The cache gets
recomputed on demand.
Clearing the cache is necessary in case an OBJECT library
gets a source added after a target (ORIGIN) that includes it
computed it's external sources cache.
This may happen in AUTOMOC when ORIGIN is processed before the
OBJECT library which gets a mocs_compilation.cpp file added.
Closes #17152
Closes #17139
Closes #17085
Closes #15967
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
d89e10cd Diagnose object library self-reference
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1053
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code
add_library(A OBJECT a.c)
target_sources(A PRIVATE $<TARGET_OBJECTS:A>)
used to crash CMake via infinite recursion while evaluating the
generator expression. Then the change in commit v3.9.0-rc1~266^2~1
(cmGeneratorTarget: Replace source classifier implementation,
2017-04-07) avoided the infinite recursion because GetKindedSources now
creates a map entry and initializes it once. If it is called again on
the same target during that initialization, the partially computed
results are returned. This is still wrong but does not crash.
Detect and diagnose this case instead.
Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
Fixes: #16578
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic added in commit v3.6.0-rc1~30^2 (Add a variable to specify
language-wide system include directories, 2016-05-24) to use
`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` incorrectly filters them by
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`. Rather than recognizing
this, commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory
explicitly, 2017-01-20) worked around the problem by incorrectly
removing `/usr/include` from `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`
so it worked in `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.
By not filtering out `/usr/include` from user-specified include
directories, we allow the code
include_directories(${CMAKE_SYSROOT}/usr/include)
to place the include directory too early on the command line.
Fix support for standard include directories to not be filtered by
implicit include directories, and do not remove `/usr/include` from the
list of implicit include directories for Android builds. Add a test
case to verify that an explicit `/usr/include` is ignored in favor
of the standard directory at the end.
Fixes: #17059
|
|
|
|
|
|
|
|
|
| |
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages. Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.
Fixes: #16944
|
|\
| |
| |
| |
| |
| |
| | |
b1ec5dea Pass large types by const&, small types by value
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !927
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Fixes: #16855
|
|
|
|
|
|
|
|
|
| |
In order to support generator expressions in target COMPILE_FEATURES
we apply them at generate time. Move this step to the beginning of
generation instead of doing it on demand while collecting flags.
This avoids repeating the process unnecessarily, and will then allow
`cmLocalGenerator::AddCompilerRequirementFlag` to be used any time
during generation.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
73020305 clang-tidy: avoid copy
b432e933 clang-tidy: use .empty() to check emptyness
012972a9 clang-tidy: remove reduntant .data() calls
b26577c9 clang-tidy: remove else after break and continue
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !734
|
| | |
|