| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
Issue: #16680
|
|
|
|
|
|
|
|
| |
BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and
CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name
of a target on macOS.
Fixes: #16589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building with multiple SDKs within one project Xcode requires
the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build
outout into separate directories. For example an iOS device and
simulator build use two different SDKs (iphoneos and iphonesimulator).
In the past cmake tries to detect embedded toolchains that could
possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN)
at the proper locations. In #16253 Mark noticed that if he
uses macosx and iphoneos in combination the necessary EPN is not
emitted. This is because CMake by default assumes macosx SDK which
does not trigger EPN emission.
The fist naive approach - enabling EPN unconditionally revealed that
then the EPN leaks into generator expressions like $<TARGET_FILE:xxx>
which might be a regression and thus is unacceptable.
The next approach was to add an CMake property to enable EPN emission
unconditionally. This solved the reported problem.
But the EPN leakage also happened for the embedded toolchains already
without anyone noticing. So the control property was turned into a
tri-state one:
* No definition: EPN is activated for embedded toolchains like before
* ON: EPN is always emitted
* OFF: EPN is never emitted
That approach gives the user the chance to disable EPN for embedded
toolchains and restores generator expression functionality for those.
Closes: #16253
|
| |
|
|
|
|
|
| |
Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and
std::map.
|
|
|
|
|
| |
Revise its signature to return `bool` so that it can fail and abort
configuration early.
|
|
|
|
|
|
|
| |
Port dependents to the new locations as needed.
Leave behind a cmState.h include in cmListFileCache to reduce noise. It
is removed in a following commit.
|
| |
|
| |
|
|
|
|
|
|
| |
Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract
lookup of the `FOLDER` property in combination with checking for
generator support of folders.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a cmOutputConverter to the cmLinkLineComputer and factory methods to
facilitate shell escapes.
Add state to the cmLinkLineComputer to record whether outputting for
response files or for watcom, to satisfy the cmOutputConverter API.
These are constant for the lifetime of the cmLinkLineComputer, even when
its functionality is extended in the future. This also keeps the
signatures of cmLinkLineComputer relatively simple.
Pass the cmComputeLinkInformation as a method parameter so that
cmLinkLineComputer is free from target-specific state. An instance
should be usable for all targets in a directory.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
c666f8cb NMake: Use ANSI encoding for NMake Makefiles
f00214aa cmGeneratedFileStream: Add optional encoding support
bb1d3370 codecvt: Add class for encoding conversion
|
| |
| |
| |
| |
| | |
Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile
generator.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At generate-time, definitions are sometimes read from a nearby cmMakefile,
making the value directory-specific because they are read once per
directory. Often however, the intention is more
often to create a 'global' setting, such that the user writes for
example:
set(CMAKE_IMPORT_LIBRARY_SUFFIX something)
once at the top level of their project.
Many of these are also set by internal platform files, such as
CMAKE_EXTRA_LINK_EXTENSIONS.
The set() definitions are not really suitable for 'global' settings
because they can be different for each directory, and code consuming the
settings must assume they are different for each directory, and read it
freshly each time with new allocations.
CMake has other variable types which are global in scope, such as global
properties, and cache variables. These are less convenient to populate
for users, so establish a convention and API using the value as it is at
the end of the top-level CMakeLists file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This method is used by directory get/set APIs. With the new
`SUBDIRECTORIES` and `BUILDSYSTEM_TARGETS` methods projects may now make
heavy use of these APIs to traverse their directory structure and
process targets. Make this faster by indexing the directory lookups.
|
|
|
|
|
|
|
|
|
| |
Delay rejection of Fortran until after we've determined the version of
the `ninja` tool to be used. This will later allow us to enable Fortran
support based on the version of ninja.
While at it, make the rejection an immediate fatal error. Also provide
a stack trace so readers know what code tried to enable Fortran.
|
|
|
|
|
|
| |
Avoid using partially-constructed cmTarget instances. Collect the
information about how to construct each target in a separate structure
and then actually create each cmTarget with full construction.
|
|
|
|
|
| |
Divide this long method into multiple helpers each dedicated to one of
the targets. This also avoids having to clear/re-use local structures.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Turn the feature check for cxx11_unordered_map into a function such that
we can use it for other features as well. Drop the 11 suffix, as we may
want to check features from other standards.
|
| |
|
|
|
|
|
|
|
| |
Use clang-tidy's performance-unnecessary-value-param checker to find
value parameter declarations of expensive to copy types that are not
modified inside the function. Ignore findings in kwsys.
After applying the fix-its, manually change `const T&` to `T const&`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first). First
run `clang-format` with the config file:
---
SortIncludes: false
...
Commit the result temporarily. Then run `clang-format` again with:
---
SortIncludes: true
IncludeCategories:
- Regex: 'sys/types.h'
Priority: -1
...
Commit the result temporarily. Start a new branch and cherry-pick the
second commit. Manually resolve conflicts to preserve indentation of
re-ordered includes. This cleans up the include ordering without
changing any other style.
Use the following command to run `clang-format`:
$ git ls-files -z -- \
'*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
egrep -z -v '^Source/cm_sha2' |
egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
egrep -z -v '^Utilities/(KW|cm).*/' |
egrep -z -v '^Tests/Module/GenerateExportHeader' |
egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
xargs -0 clang-format -i
This selects source files that do not come from a third-party.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|
|
|
|
|
| |
This generator has been deprecated since CMake 3.3. Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
|
|
|
|
|
|
|
| |
Calling `project()` or `enable_language()` from a toolchain file will
infinitely recurse since those commands load the toolchain file.
Diagnose and reject this case with an error message instead of crashing
when the stack eventually overflows.
|
|
|
|
|
|
|
|
| |
In commit v3.5.0-rc1~272^2~6 (cmGlobalGenerator: Add FindGeneratorTarget
API, 2015-10-25) a lookup was implemented via linear search. Replace it
with an efficient data structure.
Suggested-by: Stephen Kelly <steveire@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring in commit v3.5.0-rc1~272^2~13 (cmGlobalGenerator: Remove
direct storage of targets, 2015-10-25) replaced an efficient data
structure mapping from target name to cmTarget instance with a linear
search. Lookups through cmGlobalGenerator::FindTarget are done a lot.
Restore the efficient mapping structure with a name indicating its
purpose.
Reported-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
|
|
|
|
|
| |
The configure-time and generate-time types should be completely
independent.
Add ownership of cmGeneratorTarget instances to the cmLocalGenerator.
|
|
|
|
| |
Mirror the cmMakefile::FindTarget method.
|
| |
|
|
|
|
| |
Remove mapping to cmTarget.
|
|
|
|
| |
Find the target by looping when needed.
|
| |
|
| |
|
| |
|
|
|
|
| |
Simplify CMP0024 handling.
|
| |
|
|
|
|
|
|
|
|
|
| |
Set a cmLocalGenerator on each instance at compute time. That will
soon be needed to access cmGeneratorTarget instances.
If a cmExportBuildFileGenerator is processed early during configure time as a
result of CMP0024 it must be removed from the list to process later at generate
time.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
616f0311 cmGlobalGenerator: Move path computation to Compute.
9eea0486 cmGlobalGenerator: Do more computation at compute time.
2eca0559 cmGlobalGenerator: De-virtualize Compute().
21f428f4 VisualStudio: Replace Compute override with AddExtraIDETargets override.
a9588e90 VisualStudio10: Initialize the LongestSource at generate time.
4407eee0 cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute().
a09c545d Xcode: Extract a AddExtraIDETargets method.
|
| |
| |
| |
| | |
It now implements the NVI pattern.
|
| |
| |
| |
| | |
Relieve the Xcode generator of having to reimplement Compute().
|
|/ |
|