Commit Graph

28412 Commits

Author SHA1 Message Date
Brad King
e647949539 CMake 3.17.3 2020-05-28 06:57:26 -04:00
Brad King
6fce0cbcab Merge topic 'ctest-repeat-notrun' into release-3.17
bbb62dcc72 CTest: Make sure NOT_RUN tests show up in the failed test log
c503251997 Tests: Add coverage of ctest_test RETURN_VALUE and REPEAT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4801
2020-05-27 08:14:21 -04:00
Robert Maynard
bbb62dcc72 CTest: Make sure NOT_RUN tests show up in the failed test log
Issue: #20543
2020-05-27 06:43:01 -04:00
Brad King
f0ff991e42 Merge topic 'ninja-multi-install' into release-3.17
dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4778
2020-05-25 10:33:26 -04:00
Kyle Edwards
dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs
And add an "install:all" target.

Fixes: #20713
2020-05-22 13:15:50 -04:00
Robert Maynard
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile 2020-05-20 14:36:55 -04:00
Brad King
1174efb6f9 Merge topic 'vs-sln-version' into release-3.17
88ad02f1ec VS: Restore .sln support for VS Version Selector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4765
2020-05-20 09:03:23 -04:00
Brad King
88ad02f1ec VS: Restore .sln support for VS Version Selector
Since commit 3b51343ea1 (VS: Emit UTF-8 BOM for generated solution files,
2019-08-19, v3.16.0-rc1~237^2) the `.sln` file does not work with the
VS Version Selector.  Add a newline after the BOM to restore support.

Fixes: #20725
2020-05-19 08:24:37 -04:00
Brad King
00949be941 Merge topic 'fix-ClearSourcesCache' into release-3.17
a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4751
2020-05-18 12:23:40 -04:00
Brad King
a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache
In commit 40aa6c059c (cmGeneratorTarget: Add method to collect all
sources for all configs, 2017-04-10, v3.9.0-rc1~268^2~5) we forgot to
update `ClearSourcesCache` to also clear `AllConfigSources`.  This leads
to subtle cases where code paths like PCH handling that add sources
during generation break depending on ordering.

Suggested-by: Christian Fersch
Fixes: #20712, #20702
2020-05-15 08:26:43 -04:00
Brad King
44ae68d976 Merge topic 'vs-pch-compile-opts' into release-3.17
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
2020-05-12 06:53:41 -04:00
Brad King
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.

Fixes: #20694, #20456
2020-05-11 11:58:41 -04:00
Brad King
3fa0381e9e Merge topic 'pch-reuse-multi' into release-3.17
7a1c7736cb PCH: Fix REUSE_FROM in multi-config generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4717
2020-05-08 08:03:44 -04:00
Andreas Schönle
7a1c7736cb PCH: Fix REUSE_FROM in multi-config generators
Since commit a55df20499 (Multi-Ninja: Add precompile headers support,
2020-01-10, v3.17.0-rc1~136^2) the re-used PCH file object is added
once for each configuration to flags used for all configurations.
Put it in the flags for only the corresponding configuration instead.

Fixes: #20680
2020-05-07 09:55:04 -04:00
Jennifer Kathleen Green
231637eae2 cm_cxx_features: Filter out 'icpc: command line warning #10121'
This warning appears for:

    overriding '-xCORE-AVX2' with '-march=haswell'`

in some Cray environments.

Fixes: #20664
2020-04-30 13:27:59 -04:00
Jennifer Green
4ab0d37b41 cm_cxx_features: Filter out libhugetlbfs warnings
Without this, CMake fails to build on Cray systems with a
craype-hugepages modulefile loaded on the front-end due to libhugetlbfs
warnings breaking the CXX Feature tests.  Filter out the warnings so the
bootstrap can proceed to successfully install CMake on Cray Linux
systems.

Fixes: #20645
2020-04-29 08:08:59 -04:00
Brad King
615129f3eb CMake 3.17.2 2020-04-28 10:23:06 -04:00
Brad King
9db6583531 Merge topic 'makefile-objc' into release-3.17
c4d09fdc6d Makefiles: Add Objective C/C++ compilations to compile_commands.json
98aa628f0b Makefiles: Scan Objective C/C++ preprocessor dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4675
2020-04-28 07:10:07 -04:00
Brad King
c4d09fdc6d Makefiles: Add Objective C/C++ compilations to compile_commands.json
Fixes: #20634
2020-04-28 07:03:07 -04:00
Brad King
98aa628f0b Makefiles: Scan Objective C/C++ preprocessor dependencies
Fixes: #20635
2020-04-28 07:03:07 -04:00
Kyle Edwards
b45976fe10 Ninja: Remove config suffix from order-only target
Fixes: #20621
2020-04-23 12:46:58 -04:00
Brad King
8c00f5ef0a Merge topic 'apple-merge-same-sysroot' into release-3.17
3a7d1e9592 Apple: Merge per-arch sysroot parameters if all are the same

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4647
2020-04-22 08:32:02 -04:00
Brad King
c4ccf23186 Merge topic 'cpack-symlinks' into release-3.17
bcc5cd44ed CPack: Do not recurse through directory symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4637
2020-04-22 08:30:53 -04:00
Gregor Jasny
3a7d1e9592 Apple: Merge per-arch sysroot parameters if all are the same
Since commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms,
2019-07-26, v3.17.0-rc1~287^2), CMake supports "fat" builds with
different sysroots. Those are passed to the compiler with the
`-Xarch_<xyz>` parameter.

Unfortunately this breaks the Compiler Cache (ccache) because
it does not support those compiler flags:

    https://github.com/ccache/ccache/blob/v3.7.9/src/ccache.c#L2700-L2705

Restore the caching ability for certain "fat" build configurations (e.g.
`arm64` and `armv7`) where the sysroot is the same for all selected
architectures and thus a plain `-isysroot` parameter could be used.
2020-04-21 11:18:12 -04:00
Brad King
bcc5cd44ed CPack: Do not recurse through directory symlinks
Extend the fix from commit 7b8dcdd173 (CPack: Do not recurse through
directory symlinks (#12284), 2011-08-27, v2.8.6~55^2) to more places in
CPack.

Issue: #12284
2020-04-21 07:28:06 -04:00
Brad King
be88264abe Merge topic 'ninja-fortran-doc' into release-3.17
fa31c195b8 Ninja: Document that Fortran support is available with Ninja 1.10+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4626
2020-04-20 07:53:49 -04:00
Brad King
fa31c195b8 Ninja: Document that Fortran support is available with Ninja 1.10+
Ninja 1.10 was released in Jan 2020 and has the features we need
to support Fortran.  Replace documentation that mentions Kitware's
branch with mention of Ninja 1.10+ instead.
2020-04-17 10:58:53 -04:00
Brad King
e4aed8b9cd Merge topic 'ibmi-aix-exports' into release-3.17
420e91c951 AIX: Activate symbol export/import IBM i (OS400)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4611
2020-04-15 09:39:55 -04:00
Harry Mallon
dbfece1004 file(UPLOAD): Add default ca_certs
Default ca_certs were not added when using `UPLOAD` with built-in
(non-system) cURL.  Previously we only did this for `DOWNLOAD`.

Fixes: #20551
2020-04-15 08:55:09 -04:00
Brad King
420e91c951 AIX: Activate symbol export/import IBM i (OS400)
Fixes: #20582
2020-04-14 14:45:51 -04:00
Brad King
4c82f309c5 CMake 3.16.6 2020-04-10 07:37:32 -04:00
Brad King
bd580b7d56 CMake 3.17.1 2020-04-09 08:33:17 -04:00
Brad King
b8b98c98c3 Merge topic 'ccmake_incremental_log_display' into release-3.17
60bfaa8fe6 ccmake: Use incremental rendering for the logs
e9b36731e9 cmCursesLongMessageForm: Factor out helper to draw message to form

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4573
2020-04-09 08:12:12 -04:00
Brad King
0f72aba269 Merge topic 'apple-arch-sysroots' into release-3.17
84a1e67380 Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURES
45fa9b32ca Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4583
2020-04-09 08:10:55 -04:00
Sylvain Joubert
60bfaa8fe6 ccmake: Use incremental rendering for the logs
This should avoid an exponential slowdown in the display time for
projects with lots of output.
This is still slower than cmake due to the ncurses drawing, but it should
now be O(L) in total and not O(L^2) wrt to output length.

Fixes: #20535
2020-04-08 14:40:09 -04:00
Brad King
e9b36731e9 cmCursesLongMessageForm: Factor out helper to draw message to form 2020-04-08 14:39:46 -04:00
Brad King
84a1e67380 Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURES
The `CMAKE_OSX_ARCHITECTURES` value is not used directly by generators.
It is used to initialize a per-target `OSX_ARCHITECTURES` property, but
that property can also be set explicitly by project code to a subset of
the full list of architectures.  In order to handle this case, construct
a mapping from each `CMAKE_OSX_ARCHITECTURES` entry to the corresponding
`CMAKE_APPLE_ARCH_SYSROOTS` entry by name.  Use the mapping to find the
sysroot for each entry in `OSX_ARCHITECTURES` for a given target.

If `CMAKE_APPLE_ARCH_SYSROOTS` does not have the same length as
`CMAKE_OSX_ARCHITECTURES`, error out early rather than risking a crash
or assertion failure.

Fixes: #20534
2020-04-08 13:40:09 -04:00
Brad King
45fa9b32ca Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTS
Use `<arch>-SDK-NOTFOUND` instead of an empty string as a placeholder in
`CMAKE_APPLE_ARCH_SYSROOTS` for architectures whose SDK is not found.
This ensures the length of `CMAKE_APPLE_ARCH_SYSROOTS` matches the
length of `CMAKE_OSX_ARCHITECTURES`.  It also makes the missing SDKs
more visible in the value.

Issue: #20534
2020-04-08 11:51:02 -04:00
Kyle Edwards
2f949be4b3 Ninja: Make config uppercase in object order target
Fixes: #20539
2020-04-07 14:28:35 -04:00
Brad King
3d61ff7b10 Merge topic 'llvm-rc-include-path' into release-3.17
35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4570
2020-04-07 08:00:44 -04:00
Thomas Bernard
35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing
Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for
llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly
preprocess RC source files and then compile separately without -I flags.
This broke cases where the RC source references data files adjacent to
itself or in the include path.

This change adds the expansion of the include paths when calling the
llvm-rc in order for the resource files to be picked up correctly by
llvm-rc.  Since the RC compiled file is first preprocessed, the file
being compiled by llvm-rc resides in the build directory. In order for
llvm-rc to find the resource data specified relative to the .rc file
being compiled, the source file path is preppended in the include list
so that the original source path takes priority over all the other
includes paths specified.

A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include
directive work properly for llvm-rc. Checks on the rc.exe showed that
the syntax change doesn't affect it's proper operation.

Fixes: #20529
2020-04-06 21:19:12 +02:00
Brad King
d68794a707 Merge topic 'cpack-nsis-version' into release-3.17
aa78a2537c CPack/NSIS: Document and check requirement of at least NSIS 3.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4552
2020-04-01 10:43:24 -04:00
Brad King
aa78a2537c CPack/NSIS: Document and check requirement of at least NSIS 3.0
Since commit 9d2816544e (CPack/NSIS: Also preload the "UserInfo.dll"
plugin, 2020-01-04, v3.17.0-rc1~204^2) we require NSIS 3.0.  Since
older versions do not support Windows 8 or above, we can now require
at least version 3.0.

Fixes: #20514
2020-03-31 10:57:28 -04:00
Brad King
69c8bf6967 Merge topic 'link-libs-config-case' into release-3.17
2af18704fd Merge branch 'backport-3.16-link-libs-config-case'
3f976bf201 target_link_libraries: Fix regression in case of $<CONFIG> genex
5a95b5e091 target_link_libraries: Fix regression in case of $<CONFIG> genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4544
2020-03-31 09:19:42 -04:00
Brad King
9fce97939c Merge branch 'backport-3.16-link-libs-config-case' into release-3.16
Merge-request: !4544
2020-03-30 11:49:13 -04:00
Brad King
3f976bf201 target_link_libraries: Fix regression in case of $<CONFIG> genex
Since commit b8626261e9 (Precompile headers: Add methods to generate PCH
sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a
target using an upper-case configuration even though an original-case
name is sufficient.  Since commit 36ded610af (PCH: Generate sources
during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup
is the first time we compute many on-demand structures that depend on
the configuration name.  This caused the `$<CONFIG>` generator
expression to evaluate to the upper-case configuration name in some
cases where we used original-case before.

Fix this by switching the source file lookup to the original-case config
name.  Add a test covering the symptom that led to the discovery of this
problem.

Fixes: #20517
2020-03-30 11:33:55 -04:00
Brad King
5a95b5e091 target_link_libraries: Fix regression in case of $<CONFIG> genex
Since commit b8626261e9 (Precompile headers: Add methods to generate PCH
sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a
target using an upper-case configuration even though an original-case
name is sufficient.  Since commit 36ded610af (PCH: Generate sources
during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup
is the first time we compute many on-demand structures that depend on
the configuration name.  This caused the `$<CONFIG>` generator
expression to evaluate to the upper-case configuration name in some
cases where we used original-case before.

Fix this by switching the source file lookup to the original-case config
name.  Add a test covering the symptom that led to the discovery of this
problem.

Fixes: #20517
2020-03-30 11:24:27 -04:00
Brad King
b835c5d5c9 Merge topic 'ctest-timeout-report' into release-3.17
7fda917fa4 CTest: Fix reported duration on timeout when grindchild keeps pipes open

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4530
2020-03-27 07:46:14 -04:00
Brad King
2fe8ea555e Merge topic 'llvm-rc-stderr' into release-3.17
dc93cbb0d8 llvm-rc: Print stderr output when calling tools through cmake_llvm_rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4525
2020-03-27 07:39:29 -04:00
Brad King
0af3a9b755 Merge topic 'make-nested-silent' into release-3.17
d6d9da5178 Makefiles: Fix silencing of nested calls for GNU make 4.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4515
2020-03-27 07:35:12 -04:00