| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This will be used for module forwarding in order to support
`$<TARGET_OBJECTS>` usage in source and link libraries calls.
|
|
|
|
|
|
|
|
| |
De-duplicate code check rule generation in Ninja and Makefile generators
by moving their implementation to `cmCommonTargetGenerator`.
Previously Ninja was generating code check rules per language.
It was changed to generate code check rules for each source file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These directories are used to direct collators for Fortran and C++
modules to consume dependent module information to properly collate.
However, the consumption of these files merely checks for existence of
the file, not whether they are actually needed anymore.
The problem arises when a target has Fortran or C++ modules at point A,
a build occurs populating this file, and then the target is updated to
no longer have potential modules. The `DependInfo.make` (for
`Makefiles`) or `<LANG>DependInfo.json` (for `Ninja`) files still exist
as they are never guaranteed to be cleaned up. This can introduce stale
information to the build which may cause a false-positive compilation if
a module file happens to still exist and gets found this way.
Instead, query the `linked-target-dirs` using the language in question
and only add the directory if it contains potential sources for modules
coming from the language in question.
|
|
|
|
| |
Migrate from `cmCommonTargetGenerator::AddModuleDefinitionFlag`.
|
|
|
|
| |
Fixes #23463
|
|
|
|
|
|
| |
Fix spurious warnings from gfortran+Ninja for preprocessing.
Fixes: #23248
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Currently, this feature is only supported on ELF platforms. So, the property
LINK_WHAT_YOU_USE will be ignored for other plateforms.
Moreover, flags and commands are now controled by CMake variables.
Fixes: #20174
|
|
|
|
| |
Fixes: #18316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
|
|
|
|
| |
Issue: #18870
|
|
|
|
| |
Fixes: #20497
|
|
|
|
|
|
|
|
|
|
| |
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default. Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.
Fixes: #20290
|
|
|
|
| |
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Automate the conversion with
perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g'
then manually fix a few places.
|
|
|
|
|
|
| |
Rename the `LocalGenerator` and `GlobalGenerator` members to avoid
shadowing similar members in subclasses that use more-specific pointer
types.
|
|
|
|
|
| |
The method implementation is now only one call of another method, so
inline it at call sites and remove it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that `#include <cmConfigure.h>` is followed by an empty line
in header files. This is necessary to make sure that changing <> to ""
does not affect the include ordering of clang-format.
Automate with:
git grep -l '#include <cmConfigure.h>' | grep -v '.cxx$' \
| xargs sed -i '/#include <cmConfigure.h>/ { N; N; s/\n\{1,2\}/\n\n/ }'
|
|
|
|
|
| |
Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION'
feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
|
|
|
|
|
|
| |
Create a `ModuleDefinitionInfo` structure for each configuration of a
target to hold corresponding information about the selected module
definition file (`.def` source).
|
|
|
|
|
| |
Add a helper to cmCommonTargetGenerator instead of duplicating it
in cmMakefileTargetGenerator and cmNinjaTargetGenerator.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them. Start to extract the link line
computation. Create generator-specific implementations of the interface
to account for generator-specific behavior.
Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it. Isolate it with MSVC60-specific
names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It is no longer used.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add a cmLocalGenerator::GetTargetFortranFlags virtual method to get
generator-specific generation of Fortran-specific flags. Implement it
in cmLocalCommonGenerator by moving the implementation from
cmCommonTargetGenerator::AddFortranFlags. This will allow it to be used
without having a target generator available.
Inspired-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
| |
Move code to create/get the fortran module directory from the
cmCommonTargetGenerator to cmGeneratorTarget.
Rename the ComputeFortranModuleDirectory method to
CreateFortranModuleDirectory as this method *creates* the directory if
it is missing.
|
|
|
|
|
| |
Move cmCommonTargetGenerator::WorkingDirectory to cmLocalCommonGenerator
and add an access method.
|
|
|
|
| |
Move it from cmCommonTargetGenerator.
|
|
|
|
|
|
|
|
|
| |
Mostly automated:
values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
"OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
"FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* 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.
|
|
|
|
|
|
|
| |
Move this method from cmMakefileLibraryTargetGenerator so it can be
re-used for the Ninja generator too.
Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
|
|
|
|
|
| |
Return a `cmSourceFile const*` from GetModuleDefinitionFile so that
callers can get more information than just the path to the file.
|
| |
|
|
|
|
|
|
|
|
| |
Classify .manifest sources separately, add dependencies on them, and
pass them to the MS manifest tool to merge with linker-generated
manifest files.
Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
|
|
|
|
|
| |
Move computation from GetFortranModuleDirectory to a virtual method
so it can be customized for each type of generator.
|
|
|
|
|
|
|
|
| |
The Makefile generators run tools with the current working directory set
to the subdirectory of the build tree for the each target. The Ninja
generator runs tools with the current working directory set to the top
of the build tree. Tell cmCommonTargetGenerator where the working
directory will be so it can compute proper relative paths.
|
| |
|
|
|
|
|
|
| |
Factor a GetLinkedTargetDirectories method out of
cmMakefileTargetGenerator::WriteTargetDependRules to compute the list of
directories associated with targets to which the current target links.
|
|
|
|
|
|
|
|
|
|
|
| |
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>. Update our values for
CMAKE_<LANG>_COMPILE_OBJECT,
CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE
to place <INCLUDES> just before <FLAGS>.
|
|
|
|
|
| |
Move the member up from cmMakefileTargetGenerator so it can be re-used
later by cmNinjaTargetGenerator.
|
|
|
|
|
| |
De-duplicate per-target flag computation in Makefile and Ninja target
generators.
|
|
|
|
| |
Move the member up from cmMakefileTargetGenerator.
|
|
|
|
| |
Move up from cmMakefileTargetGenerator.
|
|
|
|
|
| |
Move AddFortranFlags, GetFortranModuleDirectory, and supporting members
up from cmMakefileTargetGenerator.
|