Commit Graph

51921 Commits

Author SHA1 Message Date
Brad King
397ced99d7 gitlab-ci: Add macos-arm64 jobs for Ninja and Xcode
For now, leave these jobs out during merge requests.
2021-02-23 11:21:59 -05:00
Brad King
0755c2ffbb gitlab-ci: rename macos build and test jobs to macos-x86_64
This makes room for future equivalents for other architectures.
The packaging jobs produce universal binaries, so leave them as-is.
2021-02-23 11:21:59 -05:00
Brad King
73150a3798 ci: add sccache 0.2.15 custom build for aarch64-apple-darwin
Our custom build includes a patch to avoid server startup timeouts.
2021-02-23 11:21:11 -05:00
Brad King
cab41b96ac ci: update to sccache 0.2.15 on linux builds
The upstream release includes binaries for the architectures we need.
However, the binaries do not have execute permission in their tarballs,
so add it explicitly.
2021-02-23 09:33:28 -05:00
Brad King
8dcbe5688a ci: Use Qt macOS 10.13+ package for macOS build and test jobs
It is a universal binary for both `x86_64` and `arm64` architectures.
2021-02-23 09:33:28 -05:00
Brad King
c2c31ae896 Merge topic 'test-ExternalProject-CONFIGURE_HANDLED_BY_BUILD' into release-3.20
74fe16a292 Tests: Fix ExternalProject CONFIGURE_HANDLED_BY_BUILD on 1s filesystems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5838
2021-02-23 08:09:59 -05:00
Brad King
65b70406d9 Merge topic 'test-macos-arm64' into release-3.20
1c15eb39d2 Tests: Suppress failures on macOS arm64 due to separate Xcode signing phase
92418ac0ef Tests: Fix CTestTestCrash expected output on macOS arm64
8b22d9b3c3 Tests: Remove explicit no-signing marks from BundleTest
483db3de56 Tests: Clarify internal project name in RunCMake.GoogleTest cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5846
2021-02-23 08:09:10 -05:00
Brad King
8362915b9d Merge topic 'cmake-gui-restore-search' into release-3.20
134d69121e cmake-gui: Restore search bar for cache view and environment dialog

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5845
2021-02-23 08:07:31 -05:00
Brad King
e1ea0c9540 Merge topic 'nag-fortran-include-moddir' into release-3.20
ec030877a2 NAG: Fix using Fortran modules from their output directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5842
2021-02-23 08:06:30 -05:00
Brad King
049c257e1d Merge topic 'per-config-autogen-info-file' into release-3.20
a3df25c694 Autogen: Don't change the order of HEADERS array in AutogenInfo.json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5840
2021-02-23 08:00:12 -05:00
Brad King
1c15eb39d2 Tests: Suppress failures on macOS arm64 due to separate Xcode signing phase
Some tests fail because Xcode runs `POST_BUILD` commands before signing
the binaries they run.  Tell the linker to perform ad-hoc codesign even
though Xcode normally tells it not to.

Other tests fail because `install_name_tool` does not revise ad-hoc
signatures without the codesign `linker-signed` flag.  Add that flag
ourselves where needed by our tests.

For now these changes help our test suite pass so we can use it to cover
everything else.  Both of these cases may need further investigation to
update CMake to help projects in general.

Issue: #21845, #21854
2021-02-22 15:47:13 -08:00
Sankhesh Jhaveri
134d69121e cmake-gui: Restore search bar for cache view and environment dialog
This was broken by commit f1de6f6682 (cmake-gui: Support building
against Qt6, 2020-12-17, v3.20.0-rc1~205^2~7).

Fixes: #21850
2021-02-22 17:56:59 -05:00
Brad King
92418ac0ef Tests: Fix CTestTestCrash expected output on macOS arm64 2021-02-22 17:24:14 -05:00
Brad King
8b22d9b3c3 Tests: Remove explicit no-signing marks from BundleTest
These were added by commit e29a92f525 (Xcode: Make BundleTests
compatible with Xcode 11, 2019-09-01, v3.16.0-rc1~158^2).  The
real problem is that the `.app` is constructed with text files
under the `.app/Contents/MacOS/` folder.  Move those, and drop
the special no-signing configuration.
2021-02-22 13:58:24 -05:00
Brad King
483db3de56 Tests: Clarify internal project name in RunCMake.GoogleTest cases 2021-02-22 13:30:19 -05:00
Daan De Meyer
74fe16a292 Tests: Fix ExternalProject CONFIGURE_HANDLED_BY_BUILD on 1s filesystems
Following commit 7155e358c9 (ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD
option, 2020-12-16, v3.20.0-rc1~168^2), modify the CONFIGURE_HANDLED_BY_BUILD
test to sleep 1.125 seconds to make sure the file timestamp is always
updated regardless of the resolution of the underlying filesystem.

Fixes: #21830
2021-02-22 11:17:20 -05:00
Brad King
e9efa04d8d Merge topic 'fix-IS_NEWER_THAN-usage' into release-3.20
b0da671243 FetchContent: Don't update timestamps if files don't change
404cddb7bb ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5825
2021-02-22 11:05:45 -05:00
Craig Scott
b0da671243 FetchContent: Don't update timestamps if files don't change
The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and
avoid a separate sub-build, 2021-01-29) uses a different way of writing
out the step scripts and updating time stamps when steps are executed.
That inadvertently always wrote out the scripts for custom commands,
even when the contents didn't change. This caused their timestamp to
always be updated, resulting in those steps always being seen as
out-of-date and needing to be re-executed.

The way timestamps were checked to determine whether to re-execute
a step also did not adequately account for file systems which only have
second-resolution timestamps. The IS_NEWER_THAN if condition also
returns true when timestamps are the same, so one needs to use the
negative form to get a true "is newer than" test.

ExternalProject is not susceptible to this problem because it uses
file(GENERATE) to write out the script files and that only updates the file's
timestamp if the contents change. It also mostly leaves timestamp
checking to the build tool.
2021-02-22 11:02:20 -05:00
Craig Scott
404cddb7bb ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks
When using a file system which only has second resolution timestamps,
there is a reasonably high likelihood of timestamps being the same.
The IS_NEWER_THAN test returns true when timestamps are the same,
so don't redo downloads when they match exactly.
2021-02-22 11:02:20 -05:00
Brad King
33d93089ef Merge topic 'vs-pch-one-lang' into release-3.20
9945b3b565 VS: Restore support for PCH in CXX but not C within once target
d9fd32b3b3 cmVisualStudio10TargetGenerator: Refactor per-source PCH logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5836
2021-02-22 10:40:28 -05:00
Brad King
48797098fe Merge topic 'cpackifw-scanbuild-fix' into release-3.20
90c2f138ee CPackIFWInstaller: Avoid potential null pointer dereference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5832
2021-02-22 10:39:30 -05:00
Brad King
b2b73ff713 Merge topic 'doc-cpack-dpkg-shlibdeps-l' into release-3.20
cf9a71870b Help: Fix CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5835
2021-02-22 10:38:00 -05:00
Brad King
ec030877a2 NAG: Fix using Fortran modules from their output directory
The NAG Fortran compiler's `-mdir` flag sets the module output
directory but does not add the directory to the search path for using
modules.  This is inconsistent with other compilers like the GNU Fortran
compiler's `-J` flag that does both.  In order to make these consistent,
add the module output directory with a `-I` flag on the NAG Fortran
compiler so that it will be searched when using modules too.

We already do this for the XL Fortran compiler since commit 210b0b99a9
(XL: Fix using Fortran modules from their output directory, 2020-02-28,
v3.18.0-rc1~640^2~1).
2021-02-22 09:38:12 -05:00
Craig Scott
a3df25c694 Autogen: Don't change the order of HEADERS array in AutogenInfo.json
Qt6 reads our internal AutogenInfo.json file. In 92d7b456e5
(Autogen: Add support for per-config sources, 2020-10-20), the
ordering of the HEADERS array elements was changed and this
broke their cmake_automoc_parser. We don't need to change the
order of the array elements, we can append to the existing ones
instead. Do this to allow their cmake_automoc_parser to continue
to work.

Fixes: #21823
2021-02-22 16:11:26 +11:00
Brad King
9945b3b565 VS: Restore support for PCH in CXX but not C within once target
Fix logic from commit 9df1f33c9a (VisualStudio: move PCH rules to
projects when possible., 2020-10-15, v3.20.0-rc1~638^2) to explicitly
disable PCH on sources that should not use the target-wide PCH rules.

Fixes: #21827
2021-02-19 11:25:29 -05:00
Brad King
d9fd32b3b3 cmVisualStudio10TargetGenerator: Refactor per-source PCH logic
De-duplicate the link language lookup.
2021-02-19 11:25:03 -05:00
Brad King
48410610a6 Merge branch 'release-3.19' into release-3.20 2021-02-19 09:42:14 -05:00
Brad King
020d8c85e2 Merge topic 'intel-fortran-preprocess' into release-3.20
c9244f369a IntelLLVM: Make explicit Fortran preprocessing under Ninja more robust
056d4bf528 Merge branch 'backport-intel-fortran-preprocess'
af074c266e Intel: Make explicit Fortran preprocessing under Ninja more robust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5826
2021-02-19 09:35:18 -05:00
Brad King
c8ff06a1f8 Merge topic 'docpreset' into release-3.20
87b170d9f9 Help: Add build and test preset to examples in cmake-presets(7)
3f8cf006cb Help: Clarify preset name conflict rules in cmake-presets(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5823
2021-02-19 09:34:35 -05:00
Brad King
5f32d8a4e1 Merge topic 'llvm-nm-cleanup' into release-3.20
06e5077688 bindexplib: remove stray debugging output when using llvm-nm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5828
2021-02-19 09:33:32 -05:00
Brad King
cf9a71870b Help: Fix CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS documentation
The docs added by commit d586a4ad60 (CPackDeb: dpkg-shlibdeps now
supports searching for private shared libs, 2021-01-19,
v3.20.0-rc1~115^2) specify the `-d` option, but the implementation
actually uses the `-l` option.

Issue: #21838
2021-02-19 09:14:14 -05:00
Craig Scott
90c2f138ee CPackIFWInstaller: Avoid potential null pointer dereference
In d16830324f (CPackIFW: Improve warning and docs for show page list
option, 2021-02-14), code was added to report the current QtIFW version.
That code didn't check that there was a Generator object before using it,
resulting in a scanbuild warning about a potential null pointer dereference.
Add a check and output a more general warning message if we don't have
the current QtIFW version available to report.
2021-02-19 17:11:53 +11:00
Brad King
0ee997b132 Merge topic 'doc-if-links' into release-3.20
22140f7af3 Help: Add internal links to if() docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5824
2021-02-18 15:12:30 -05:00
Michael Hirsch
87b170d9f9 Help: Add build and test preset to examples in cmake-presets(7)
Co-Author: Brad King <brad.king@kitware.com>
2021-02-18 14:53:28 -05:00
Michael Hirsch
3f8cf006cb Help: Clarify preset name conflict rules in cmake-presets(7) 2021-02-18 14:53:28 -05:00
Brad King
98ae005137 Merge topic 'preset-json-comments' into release-3.20
8f1e607ed9 Help: Document JSON comment support in cmake-presets(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5830
2021-02-18 14:52:26 -05:00
Brad King
af91c602fe Merge topic 'doc-presets' into release-3.20
47ab2d4d2e Help: Clarify role of binaryDir inheritance in cmake-presets(7)
0e3c361f77 Help: Link to tool-specific preset arguments from cmake-presets(7)
dd6165fbd4 Help: Mention version 2 in cmake-presets(7)
cdbd1ae64b Utilities/Sphinx: Avoid converting -- to an en-dash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5829
2021-02-18 14:35:36 -05:00
Michael Hirsch
8f1e607ed9 Help: Document JSON comment support in cmake-presets(7) 2021-02-18 11:47:40 -05:00
Brad King
47ab2d4d2e Help: Clarify role of binaryDir inheritance in cmake-presets(7)
Suggested-by: Michael Hirsch
2021-02-18 11:01:29 -05:00
Brad King
0e3c361f77 Help: Link to tool-specific preset arguments from cmake-presets(7)
Fixes: #21835
2021-02-18 10:55:10 -05:00
Brad King
dd6165fbd4 Help: Mention version 2 in cmake-presets(7)
Version 2 is required for build and test presets.

Fixes: #21829
2021-02-18 10:55:10 -05:00
Brad King
cdbd1ae64b Utilities/Sphinx: Avoid converting -- to an en-dash 2021-02-18 10:55:09 -05:00
Michael Hirsch, Ph.D
22140f7af3 Help: Add internal links to if() docs 2021-02-18 10:20:34 -05:00
Brad King
06e5077688 bindexplib: remove stray debugging output when using llvm-nm
Remove a debugging message left by commit c856d4556b (bindexplib:
supporting llvm bitcode formats using llvm-nm, 2019-08-13,
v3.16.0-rc1~161^2~1).
2021-02-18 09:37:21 -05:00
Brad King
94408da2a7 Merge topic 'fix-intel-compiler-check' into release-3.20
dc7b6c2c06 DetermineCompiler: Fix copy-paste error in Intel Compiler detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5818
2021-02-18 08:19:45 -05:00
Brad King
759923420b Merge branch 'backport-intel-fortran-preprocess' into release-3.19
Merge-request: !5826
2021-02-18 08:13:49 -05:00
Craig Scott
eefcf2e0a6 Merge topic 'fetchcontent-patch-step-typo' into release-3.20
bd876f3849 FetchContent: Restore patch command support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5822
2021-02-18 07:39:23 -05:00
Brad King
c9244f369a IntelLLVM: Make explicit Fortran preprocessing under Ninja more robust
Tell the Fortran compiler to write preprocessor output directly to a
file, as we do for the GNU compiler.  The previous "redirect stdout"
approach could break during ABI detection with some `mpif90` wrappers
that add version information to stdout when called with `-v`.

Issue: #21828
2021-02-18 07:36:32 -05:00
Brad King
056d4bf528 Merge branch 'backport-intel-fortran-preprocess' 2021-02-18 07:35:35 -05:00
Brad King
af074c266e Intel: Make explicit Fortran preprocessing under Ninja more robust
Tell the Fortran compiler to write preprocessor output directly to a
file, as we do for the GNU compiler.  The previous "redirect stdout"
approach could break during ABI detection with some `mpif90` wrappers
that add version information to stdout when called with `-v`.

Fixes: #21828
2021-02-18 07:35:12 -05:00