| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to
determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
assumed that CUDA properties would be set only if CUDA is enabled.
We cannot do a device link step if we do not have the CUDA language
enabled. This was discovered as some projects unconditionally set CUDA
properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA
language has not been enabled.
Fixes: #19432
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously CMake used fairly naive logic to determine when to do
device linking which caused unnecessary device linking to occur
frequently. We now use a more exhaustive algorithm to determine
when we have a need for device linking.
Fixes: #19238
|
|
|
|
|
|
|
| |
By using a `std::set<std::string>` container instead of a
`std::vector<std::string>` container, the clean files list becomes sorted and
unique. The clean target in Makefiles beomes nicer and better readable this
way. Also double clean entries won't appear anymore.
|
|
|
|
|
| |
Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator`
and 'OSXBundleGenerator` rather than manually handling the lifetime.
|
| |
|
|
|
|
|
|
| |
Rather than taking a number of out parameters for the various names,
create a structure that is reused for both `GetLibraryNames` and
`GetExecutableNames`. Replace uses according to the new interface.
|
|
|
|
|
|
|
| |
`CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and
executable target types. This relaxation is to allow for better
interoperability with linkers that automatically do CUDA device symbol
resolution and have no way to disable it.
|
| |
|
|
|
|
|
| |
IWYU now correctly requires `<utility>` for `std::move`. It also
requires a container header when used via a range-based for loop.
|
|\
| |
| |
| |
| |
| |
| | |
50fbfee3a0 cmLocalGenerator: return directories as const std::string&
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2309
|
| | |
|
|/
|
|
| |
issue: #18251
|
|
|
|
| |
Fixes: #17997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This family enable to manage link flags
Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS
Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties
Fixes: #16543
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have been hitting the Windows command-line limit when cross-compiling
static library (POCO) and having more than 8000 characters in the call
to "ar". Calculating exact limits here are tricky, since this particular
limit will only take into account object file strings, which is correct
for response files, but not for the archive rules (link.txt files),
since they also contain the call to "ar" and its arguments.
Also, there can be other additional arguments if "ar" tool is wrapped
into something else, so it is a good idea to leave more space than
trying to exactly fit the limit.
Since response files use half of the limit as a heuristic, we reproduce
it here for consistency.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
The 'requires' step was used to provide implicit dependencies between
the generated Fortran module files and a Fortran target that needs these
module files to ensure the correct compilation order. After recent
refactoring to resolve all dependencies explicitly through `.mod.stamp`
make targets, the separate 'requires' step is not needed anymore.
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|\
| |
| |
| |
| |
| |
| | |
3bbe95f5 Clean up iwyu code to not be one big if statement.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1247
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This
is used for co-compile commands. These are tools that want to mirror the
compiler. For each compiler invocation the tool will be invoked first. This
started as a way to implement include what you use (iwyu), but has expanded
to include cpplint, cppcheck and others. Likely there will be more in the
future as well. This commit implements each one in its own function and
provides a way to add additional ones in the future with less work.
|
|/
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using a compiler to drive linking we add compiler flags from
`CMAKE_<LANG>_FLAGS` in case they affect the way the compiler invokes
the linker, but we don't add flags from other places that are meant only
for compiling sources. Rather than calling the `AddLanguageFlags`
method (which is used to add flags for compiling sources) directly, add
an intermediate method that is used when adding the flags for linking.
This will give us a way to add language-specific compiler flags needed
when driving the linker in the same place on the command line as other
compiler flags go.
|
| |
|
|
|
|
|
| |
The method implementation is now only one call of another method, so
inline it at call sites and remove it.
|
|
|
|
|
|
|
| |
If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled
it will now perform the device link step. The normal behavior is
to delay calling device link until the static library is consumed by
a shared library or an executable.
|
| |
|
|
|
|
|
| |
Named enumeration values are much clearer at call sites and add more
type safety.
|
|
|
|
|
| |
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
|
|
|
|
|
| |
Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION'
feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
When creating a static library with the archive tool, only the `.a`
needs to be removed to start a fresh archive. Any other files (e.g.
symbolic links we may later add) are not managed by the archive tool and
therefore do not need to be cleaned.
|
|
|
|
|
| |
Revise construction of the list of files to be cleaned for the target to
list the "real" file first.
|
|
|
|
|
| |
The device link step runs the host compiler internally so we need to use
the proper compiler PDB file with MSVC.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Include it in dependents which have previously relied on it
transitively.
|
| |
|
| |
|
|
|
|
|
|
| |
Add a factory function to cmLocalGenerator so that variableMappings can
be provided from it, and so that Ninja can always have a hard-coded
TargetImpLib.
|
|
|
|
| |
Don't rely on the cmGeneratorTarget type needlessly.
|
|
|
|
|
|
|
| |
The rule replacement API should not really be in cmLocalGenerator, but
it was historically, and this coupled many other things together here
too, such as output conversion. Make the output converter a parameter
so that rule replacement can be removed from cmLocalGenerator.
|
|
|
|
|
|
|
|
|
| |
This one is not like the others as it doesn't participate in
substitutions. Keep ExpandRuleVariables doing only one thing and make
callers responsible for inserting a launcher prefix, simplifying the
code all-around.
Remove now-obsolete InsertRuleLauncher method.
|