| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
23691d78 CUDA: Allow sources to be compiled to .ptx files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !725
|
| |
| |
| |
| |
| | |
When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT
libraries will generate ptx files instead of object files.
|
|/
|
|
|
| |
Named enumeration values are much clearer at call sites and add more
type safety.
|
|
|
|
|
| |
Add a `GetObjectDirectory` method to get the target's object file
directory for a specific configuration.
|
| |
|
|
|
|
| |
Update one remaining call site to avoid using the default.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call sites such as those in the VS global generator that are used only
to reject per-config sources will now allow per-config object library
objects. The corresponding generators have already been taught to deal
with per-config object library files. Remaining call sites do not need
object library files anyway.
This will later allow `$<TARGET_OBJECTS:...>` generator expressions to
evaluate to values that vary by configuration (e.g. because each
configuration has its own object files).
|
|
|
|
|
|
| |
Multi-config generators like VS and Xcode need to loop over all the
source files first and then handle per-config information within
each one. Teach cmGeneratorTarget to provide such a view.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
229abfc8 cmGeneratorTarget: Drop unused UseObjectLibraries method
63fbf587 Xcode: Inline relevant parts of UseObjectLibraries
1afacebe Xcode: Do not add Object Libraries source group on Xcode >= 5
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !698
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
1d829c86 Use quotes for non-system includes
26ee9e42 CPack: drop CPack prefix for includes
5afac50f cmConfigure: Ensure separate include block in headers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !691
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Automate with:
git grep -l '#include <cm_' -- Source \
| xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
git grep -l '#include <cmsys/' -- Source \
| xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
git grep -l '#include <cm[A-Z]' -- Source \
| xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
|
|/ |
|
|
|
|
|
| |
Compute and memoize the list of sources with their kinds for each
configuration just once.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
d1dac1ac Xcode: Execute RunCMake.Framework also for Xcode generator
d02709d7 Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressions
013ffe76 cmGeneratorTarget: Call GetFrameworkDirectory in GetFullNameInternal
32e9d0ca cmGeneratorTarget: Use enum to describe bundle directory query level
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !635
|
| |
| |
| |
| | |
Closes #16733
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dfa8263f Implement interprocedural optimization for GNU compilers
1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled,
e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !568
|
| |
| |
| |
| |
| | |
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was
honored only for the Intel compiler on Linux and otherwise ignored. In
order to add support for more compilers incrementally without changing
behavior in the future, add a new policy whose NEW behavior enforces the
`INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported
compilers and otherwise produce an error.
|
| |
| |
| |
| |
| | |
Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION'
feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
|
|/
|
|
| |
Issue: #16680
|
|
|
|
|
|
|
|
|
|
|
| |
The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols
found in object files explicitly given to the linker. However, the
linker may also find additional symbols in dependencies and copy them
into the linked binary (e.g. from `msvcrt.lib`). Provide a way to
export an explicit list of such symbols by adding a `.def` file as a
source file.
Fixes: #16473
|
|
|
|
|
|
|
| |
Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the
implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a
`.def` file as a source. Only one of these could be used within a
single target before anyway.
|
|
|
|
|
|
| |
Create a `ModuleDefinitionInfo` structure for each configuration of a
target to hold corresponding information about the selected module
definition file (`.def` source).
|
|
|
|
| |
Add a `cmGeneratorTarget::GetModuleDefinitionSources` method.
|
|
|
|
| |
Speed up VS project generation with many such headers.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an `IMPORTED_LIBNAME[_<CONFIG>]` target property to specify a library
name to be placed on the link line in place of an interface library
since it has no library file of its own. Restrict use of the property
to imported `INTERFACE` libraries.
This will be particularly useful for find modules that need to provide
imported libraries from system SDKs where the full path to the library
file is not known. Now such find modules will be able to provide an
imported interface library and set `IMPORTED_LIBNAME` to refer to the
SDK library by name.
Issue: #15267
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
cef59bb8 cmTarget: Implement GetProperty in terms of cmState::Snapshot
0d57b07a cmTarget: Group code for checking written properties together
c3fb0d95 cmTarget: Move sanity checks and computed property access to callers
fa9dbc56 cmGeneratorTarget: Implement cmTargetPropertyComputer interface
848ae2a6 cmTargetPropertyComputer: Template some methods on the Target
a0a720e6 cm{,Generator}Target: Add global generator accessors
637e3f3e cmTargetPropertyComputer: Unify whitelist handling from cmTarget
05251e6d cmTargetPropertyComputer: Move whitelist check from cmTarget
fbf1721c cmTargetPropertyComputer: Extract into new files
390a7d86 cmTargetPropertyComputer: Implement GetProperty without cmMakefile
e32a6bdd cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot
7863fba1 cmTarget: Extract GetLocation method
8096682e cmTarget: Extract GetSources method
7d57c1a2 cmTarget: Extract location computation methods
a55cac4b cmTarget: Split property computation into separate class
705fcf52 cmTarget: Move IMPORTED check to callers
...
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Populate a local member for the sources property when the instance is
created. Pass the parameter to avoid the policy check when doing so.
Ordinarily, the GetSources function should not be called unconditionally
(at generate time), but we need to do so here in case the property is
read in a generator expression. The intent is to be able to implement
cmGeneratorTarget without requiring cmTarget.
|
| |
| |
| |
| |
| | |
Provide 'static polymorphism' between the types in this aspect so that
they can be used indiscriminately in a C++ template.
|
|/
|
|
|
|
| |
Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract
lookup of the `FOLDER` property in combination with checking for
generator support of folders.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our buildsystem model says that the default Fortran module output
directory is the build tree directory corresponding to the source tree
`CMakeLists.txt` file adding the current target. Extend
`cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to
pass in the compiler working directory. If the working directory does
not match the default Fortran module output directory then we need an
explicit module directory flag (e.g. `-J`) to tell the compiler to
put/use modules in the latter.
This does not affect the Makefile generator but will be useful for
future introduction of Fortran support to the Ninja generator.
|
| |
|
| |
|
| |
|