| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-Authored-by: Brad King <brad.king@kitware.com>
|
|
|
|
|
|
|
| |
If target property LINKER_LANGUAGE is set, LINK_LANGUAGE generator
expression evaluation must be always successful.
This fix can be helpful to elaborate a solution for issue #21818.
|
|
|
|
| |
Avoid relinking before installation.
|
|
|
|
|
| |
We already have a message for the "Ninja" generator, but it applies
to the "Ninja Multi-Config" generator too.
|
|
|
|
| |
We use the `CMake_` prefix for options affecting CMake itself.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ef935b17ab clang-tidy: fix `readability-use-anyofallof` warnings
9ac8dbbb94 clang-tidy: fix `readability-simplify-boolean-expr` warnings
ca505718f4 clang-tidy: fix `readability-redundant-string-init` warnings
b3b6ede6a1 clang-tidy: fix `readability-redundant-access-specifiers` warnings
cdfc4e3195 clang-tidy: fix `readability-qualified-auto` warnings
808b17b120 clang-tidy: fix `readability-make-member-function-const` warnings
4470eb5179 clang-tidy: fix `performance-trivially-destructible` warnings
4f396e6528 clang-tidy: fix `performance-no-automatic-move` warnings
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5731
|
| | |
|
|/
|
|
|
|
|
|
|
| |
Following variables now support target dependent generator expressions.
- CMAKE_RUNTIME_OUTPUT_DIRECTORY
- CMAKE_LIBRARY_OUTPUT_DIRECTORY
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY
Fixes: #18055
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
|
|
|
|
|
| |
The Xcode generator is the only place left that we do not support
per-config sources. Make the corresponding helper Xcode-specific to
avoid any other new uses.
|
|
|
|
| |
Co-Author: Brad King <brad.king@kitware.com>
|
|
|
|
|
|
|
| |
Add support for constructing and using multiple generators for one
custom command. cmGeneratorTarget contains a code path that needs this
behavior when used with Ninja but not other generators, so use virtual
dispatch through cmLocalGenerator.
|
|\
| |
| |
| |
| |
| |
| |
| | |
9af93fef11 ISPC: Handle OBJECT sources in different directories
72ae15ebcb ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5581
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dd77dec18d VS: Don't compute CUDA options unless necessary
e9109dec36 Merge branch 'ninja-multi-per-config-sources' into release-3.18
7c0de4175b Merge branch 'cmake-E-cat-binary' into release-3.18
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5422
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change was originally made by commit 74b1c9fc8e (Explicitly specify
language flag when source LANGUAGE property is set, 2020-06-01,
v3.19.0-rc1~722^2), but it was reverted by commit 30aa715fac (Revert
"specify language flag when source LANGUAGE property is set",
2020-11-19) to restore compatibility with pre-3.19 behavior.
Implement the change again, but add policy CMP0119 to make this change
while preserving compatibility with existing projects.
Note that the `Compiler/{Clang,Intel,MSVC}-CXX` modules do not need to
specify `-TP` for their MSVC-like variants because we already use the
flag in `CMAKE_CXX_COMPILE_OBJECT`. Similarly for `Compiler/XL-CXX`
and `Platform/Windows-Embarcadero`.
Note also that this does not seem possible to implement for XL C.
Even with `-qsourcetype=c`, `xlc` complains about an unknown suffix:
`1501-218 (W) file /.../AltExtC.zzz contains an incorrect file suffix`.
It returns non-zero even with `-qsuppress=1501-218`.
Co-Author: Robert Maynard <robert.maynard@kitware.com>
Fixes: #14516, #20716
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously we only used cmCustomCommandGenerator to evaluate generator
expressions for dependencies. Use it for command lines too. It also
collects target references for us, with backtraces.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
dd77dec18d VS: Don't compute CUDA options unless necessary
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5422
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the following scenario (with 3.18 policies):
1. A CXX target is created.
2. CUDA language is enabled.
CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be
set. Because the CXX target was created before CUDA was enabled it
wouldn't have it set. The Visual Studio generator would however end up
computing CUDA compile options for the CXX target, which would result in
a fatal error due to the policy violation.
There doesn't seem to be a reason to do this for targets that don't
actually use the CUDA language, so we can skip and generate the CXX
target just fine.
Fixes: #21341
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
cd33bfcad5 add_custom_command: Properly recognize if sources depend on config
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5410
|
| | |
| | |
| | |
| | | |
Fixes: #21349
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Since commit 777ceaea94 (cmMakefile: Delay custom command creation,
2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations at
generate time. Therefore we do not need to look up what source file
holds the custom command producing a given output until generate time.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
b6c60f14b6 macOS: Default to arm64 architecture on Apple Silicon hosts
383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings
8f75912176 Tests: Enable Assembler test case when CMAKE_OSX_ARCHITECTURES has one value
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5291
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Detect `arm64` hardware using a method that pierces Rosetta. If
`CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to the
toolchain to use `arm64` instead of letting the toolchain pick.
Fixes: #20989
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
c88dde2869 cmGeneratorTarget: internal refactoring
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5289
|
| |/ / |
|
|/ /
| |
| |
| |
| | |
Previously only occurred per config which broke per-language
system includes.
|
| |
| |
| |
| | |
Fixes: #21198
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8c8f03422e PCH: Template instantiation support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5168
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds PCH_INSTANTIATE_TEMPLATES target property for enabling template
instantiation in precompiled headers.
Enabled by default. Currently only supported for Clang 11 and newer.
Implements #21133.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Revise logic in `ComputeOutputDir` that was previously missing
a check for nullptr before constructing a `std::string`.
Fixes: #21165
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
a020787a9b ISPC: Support generation for multiple instruction sets
5a1750017e ISPC: Add compiler launcher support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5173
|
| | | | |
|
|/ / / |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The logic in AddSwiftInterfaceIncludeDirectories is something
that other languages will want going forward
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add an `OPTIMIZE_DEPENDENCIES` target property and supporting
`CMAKE_OPTIMIZE_DEPENDENCIES` variable to optionally enable pruning and
flattening of outgoing dependencies from static libraries. Since they
do not actually link, they only depend on side effects of their
dependencies. Therefore we can drop dependencies that contribute no
side effects.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
70ce1ad64a PCH: Avoid Apple-specific architecture flags on other platforms
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5118
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit f593b354da (PCH: Add support for multi architecture iOS
projects, 2020-04-02, v3.18.0-rc1~414^2) the `OSX_ARCHITECTURES` target
property (and corresponding `CMAKE_OSX_ARCHITECTURES` variable) affects
flags on non-Apple platforms by accident. Add a missing condition to
avoid this.
Fixes: #21072
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem. In practice, this has become limiting:
* Header-only libraries do have sources, they just do not compile.
Developers should be able to edit those sources (the header files)
in their IDE.
* Header-only libraries may need to generate some of their header
files via custom commands.
Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.
Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.
Fixes: #19145
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we disallowed use of arbitrary properties on INTERFACE
libraries. The goal was to future-proof projects using them by not
allowing properties to be set that may affect their future inclusion in
the generated buildsystem. In order to prepare to actually include
INTERFACE libraries in the generated buildsystem, drop the filter and
allow arbitrary properties to be set.
Issue: #19145
|
| | |
|
| |
| |
| |
| |
| | |
Targets created by `add_custom_target` cannot be used with
`target_link_libraries` and so have no link implementation.
|