| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.
No functional change intended.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
2c06e9e7 include_external_msproject: Support non-Windows target platforms
c89e8522 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1525
|
| | |
|
|/
|
|
|
| |
Remove the cmQtAutoGenDigest classes and make
cmQtAutoGeneratorInitializer instantiable instead.
|
|
|
|
|
|
|
| |
When CMake will not generate a test, package, or package_source target,
allow projects to create their own targets with these names.
Fixes: #16062
|
|\
| |
| |
| |
| |
| |
| |
| | |
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.
Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.
Fixes: #16872
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.
For now we reject the option by default if explicitly set. It will be
implemented on a per-generator basis. Pass the setting into try_compile
project generation. Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.
Issue: #17268
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a large commit that serves multiple purposes
- Iterate source files only once and store all extracted
information in a cmQtAutogenDigest class that can be reused.
This is brings speed improvements because several properties
are only evaluated once. More that that it helps to avoid
duplication of code with non trivial files property checks.
- Fix the Visual Studio generator to use PRE_BUILD when possible.
- Convert `for( ... )` loops to C++11 range base loops where possible
(cmQtAutogen*.cxx only).
- String concatenation optimizations.
|
| |
|
|
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
| |
|
|
|
|
|
|
| |
The `CurrentMakefile` member is shadowed by a generate-time member of
the same name in `cmGlobalXCodeGenerator`. Rename our member to clarify
its configure-time role and avoid the shadow.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add a `HasKnownObjectFileLocation` method returning whether we know the
exact location of object files produced by the native build system.
This is true everywhere except on Xcode when an architecture placeholder
is used.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|