Commit Graph

53155 Commits

Author SHA1 Message Date
Jason Erb a50db66bbd CPack/WIX: Use language en-US, font Consolas, size 14
Improve rendering of text from `CPACK_RESOURCE_FILE_LICENSE`.

Fixes: #22228
2021-05-24 12:34:03 -04:00
Kitware Robot 7ee3ccbbea CMake Nightly Date Stamp 2021-05-22 00:01:12 -04:00
Brad King 77d261aec1 Merge topic 'ci-fedora34-mpi'
2bc0708c39 ci: Switch to MPICH in Fedora jobs
ef25359eda ci: add MPICH to Fedora base image

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6152
2021-05-21 13:20:17 -04:00
Brad King 2bc0708c39 ci: Switch to MPICH in Fedora jobs
The OpenMPI package in Fedora 34 requires a CPU with AVX instructions.
Some of our CI machines do not have them, and so fail the FindMPI.Test
test with `SIGILL`.  Switch to MPICH.  Since we test with OpenMPI on the
Debian jobs, this covers more MPI vendors anyway.
2021-05-21 12:37:37 -04:00
Brad King ef25359eda ci: add MPICH to Fedora base image 2021-05-21 12:35:44 -04:00
Brad King 2d3114c9b8 Merge topic 'imported-framework-soname-file'
820d3afb28 Framework: Fix $<TARGET_SONAME_FILE:...> for imported frameworks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !6147
2021-05-21 10:39:31 -04:00
Brad King 96995d38cd Merge topic 'message-color'
0a0a0f8a74 cmMessenger: Color messages to terminal by type
bceb8e2ed2 cmMessenger: Pass title inside a metadata structure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6105
2021-05-21 10:38:50 -04:00
Brad King f282b57388 Merge branch 'release-3.20' 2021-05-21 10:36:56 -04:00
Brad King bd0ccb73f2 Merge topic 'git-config-version-check'
8a9753e427 ExternalProject: Only add git config setting with git 1.7.7 or later

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6145
2021-05-21 10:36:56 -04:00
Brad King fe9988add3 Merge topic 'git-config-version-check' into release-3.20
8a9753e427 ExternalProject: Only add git config setting with git 1.7.7 or later

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6145
2021-05-21 10:36:56 -04:00
Kitware Robot f9067e806f CMake Nightly Date Stamp 2021-05-21 00:01:09 -04:00
Kyle Edwards 820d3afb28 Framework: Fix $<TARGET_SONAME_FILE:...> for imported frameworks 2021-05-20 15:00:22 -04:00
Brad King d98a7cdb25 Merge topic 'cmake-ninja-workdir'
2725ecff38 Ninja: Handle depfiles with absolute paths to generated files
bc40cd7a4e Tests: Add case covering a unity build with a generated source
ae927f936d cmGlobalNinjaGenerator: Improve allocation pattern in WriteBuild
68e5f92cad cmGlobalNinjaGenerator: Factor out custom command output collection
c5195193d3 cmGlobalNinjaGenerator: Reduce string copies in WriteCustomCommandBuild
8bac527b0c cmGlobalNinjaGenerator: Re-order logic in WriteCustomCommandBuild
ddc030f5ca cmGlobalNinjaGenerator: Record implicit outputs as known too
ceb82752ef cmLocalNinjaGenerator: Use variable for main custom command output path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6143
2021-05-20 09:26:46 -04:00
Brad King 6f656d6b58 Merge topic 'install-script-all-components'
99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6140
2021-05-20 09:25:36 -04:00
Brad King 35ea23a618 Merge topic 'cmCommandLineArgument_understands_exact_versus_matching_variables'
396e0a840e cmCommandLineArgument: OneOrMore mode supports `=` separator
372bf1bcc4 cmCommandLineArgument: Understands which commands require partial matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6142
2021-05-20 09:19:14 -04:00
Craig Scott 8a9753e427 ExternalProject: Only add git config setting with git 1.7.7 or later
1cb65e680d (ExternalProject: Prevent the noisy detached head
messages on checkout, 2021-01-17) unconditionally added the advice.detachedHead
git config setting, but it requires git 1.7.7 or later. Since it isn't fatal to not
have it, just noisier, only add it when it is supported.

Fixes: #22206
2021-05-20 22:39:04 +10:00
Marius Messerschmidt 0a0a0f8a74 cmMessenger: Color messages to terminal by type
Fixes: #16183
2021-05-20 07:38:45 -04:00
Kitware Robot 34f9a551ce CMake Nightly Date Stamp 2021-05-20 00:01:08 -04:00
Brad King 2725ecff38 Ninja: Handle depfiles with absolute paths to generated files
Ninja treats every (normalized) path as its own node.  It does not
recognize `/abs/path/to/file` in a depfile as matching `path/to/file`
even when `build.ninja` and the working directory are in `/abs/`.
See Ninja Issue 1251.  In cases where we pass absolute paths to the
compiler, it will write a depfile containing absolute paths.  If those
files are generated in the build tree by custom commands, `build.ninja`
references them by relative path in build statement outputs, so Ninja
does not hook up the dependency and rebuild the project correctly.

Add infrastructure to work around this problem by adding implicit
outputs to custom command build statements that reference the main
outputs by absolute path.  Use a `${cmake_ninja_workdir}` placeholder
to avoid repeating the base path.  For example:

    build out.txt | ${cmake_ninja_workdir}out.txt: CUSTOM_COMMAND ...

Ninja will create two nodes for the output file, one with a relative
path and one with an absolute path.  A depfile may then mention either
form of the path and Ninja will hook up the dependency.  Unfortunately
Ninja will also stat the file twice.

Issue: #13894
Fixes: #21865
2021-05-19 13:28:14 -04:00
Nils Gladitz 99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
In a per-component installation the generated installation scripts
are invoked once for each component.

Per default custom installation script code added by install(CODE|SCRIPT)
only runs for one specific component in this context.

The new ALL_COMPONENTS option allows custom script code to be run once
for each component being installed.
2021-05-19 19:17:58 +02:00
Brad King bc40cd7a4e Tests: Add case covering a unity build with a generated source
Exclude the case on generators where it does not yet work.

Issue: #21865
2021-05-19 12:37:18 -04:00
Brad King ae927f936d cmGlobalNinjaGenerator: Improve allocation pattern in WriteBuild 2021-05-19 12:37:16 -04:00
Brad King 68e5f92cad cmGlobalNinjaGenerator: Factor out custom command output collection
De-duplicate code paths calling ConvertToNinjaPath and
SeenCustomCommandOutput on custom command outputs and custom target
byproducts.
2021-05-19 12:07:58 -04:00
Brad King c5195193d3 cmGlobalNinjaGenerator: Reduce string copies in WriteCustomCommandBuild
Re-order arguments to group those with similar roles.
Use move semantics to avoid copying vectors of strings.
2021-05-19 12:07:58 -04:00
Brad King 8bac527b0c cmGlobalNinjaGenerator: Re-order logic in WriteCustomCommandBuild
Save explicit dependencies earlier.
2021-05-19 12:07:58 -04:00
Brad King ddc030f5ca cmGlobalNinjaGenerator: Record implicit outputs as known too 2021-05-19 12:07:58 -04:00
Brad King ceb82752ef cmLocalNinjaGenerator: Use variable for main custom command output path 2021-05-19 12:07:58 -04:00
Robert Maynard 396e0a840e cmCommandLineArgument: OneOrMore mode supports = separator
Fixes #22187
2021-05-19 11:37:30 -04:00
Robert Maynard 372bf1bcc4 cmCommandLineArgument: Understands which commands require partial matching
Allows us to provide better error messages when commands such as
`--target` are passed invalid input.
2021-05-19 11:07:16 -04:00
Marius Messerschmidt bceb8e2ed2 cmMessenger: Pass title inside a metadata structure 2021-05-19 09:06:27 -04:00
Brad King 82fd8b6ba3 Merge branch 'release-3.20' 2021-05-19 07:54:42 -04:00
Brad King b78ba8bd31 Merge topic 'nvhpc-ninja-depfile'
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
2021-05-19 07:54:42 -04:00
Brad King c23e2fa0c5 Merge topic 'nvhpc-ninja-depfile' into release-3.20
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
2021-05-19 07:54:41 -04:00
Kitware Robot 4b12aa6e6c CMake Nightly Date Stamp 2021-05-19 00:01:42 -04:00
Robert Maynard 364f6af1d7 NVHPC: Support Ninja dependency scanning
Fixes: #22168
2021-05-18 12:56:46 -04:00
Brad King 1b8d409342 Merge topic 'gitignore'
cbeff3082d .gitignore: Add CLion directories and VS build directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6138
2021-05-18 11:49:31 -04:00
Robert Maynard 521cfc38a3 NVHPC: Support explicit language flags 2021-05-18 11:30:01 -04:00
Viktor Wallner cbeff3082d .gitignore: Add CLion directories and VS build directory 2021-05-18 17:04:47 +02:00
Brad King a577d3c026 Merge topic 'relative-paths'
8526756b61 cmOutputConverter: Adopt relative path conversion helpers
013ec595c8 cmLocalGenerator: De-duplicate StateSnapshot member
24bfdbcffb cmLocalGenerator: Remove unused MaybeRelativeToCurSrcDir method
d6fe1bdb6d cmLocalGenerator: Localize logic mapping source path to object file name
4cb6a53bf5 cmListFileCache: Simplify relative path conversion in backtraces
5b3a71a83f cmSystemTools: Adopt RelativeIfUnder helper
ea9b1d36b8 cmStateDirectory: Clarify relative path top selection logic
2d9109df7c cmStateDirectory: Remove network path logic from relative path top selection
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6128
2021-05-18 09:31:25 -04:00
Brad King 62b0eba266 Merge topic 'doc-link-compile-options'
2eba7d7524 Help: Add SHELL, LINKER and host/device discussions to property docs
b20c1f4880 Help: Make SHELL option examples more generic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6130
2021-05-18 09:30:44 -04:00
Kitware Robot 3f9acb9a60 CMake Nightly Date Stamp 2021-05-18 00:01:10 -04:00
Brad King 8526756b61 cmOutputConverter: Adopt relative path conversion helpers
Move them up from cmLocalGenerator and out of cmStateDirectory.
2021-05-17 10:04:01 -04:00
Brad King 013ec595c8 cmLocalGenerator: De-duplicate StateSnapshot member
We have the member from the cmOutputConverter parent.
2021-05-17 10:03:43 -04:00
Brad King 24bfdbcffb cmLocalGenerator: Remove unused MaybeRelativeToCurSrcDir method
With the recent update to `GetObjectFileNameWithoutTarget`, we no longer
have any call sites for `MaybeRelativeToCurSrcDir`.  It does not make
sense for the generator to produce paths relative to the source tree in
general, so remove the method.
2021-05-17 10:03:43 -04:00
Brad King d6fe1bdb6d cmLocalGenerator: Localize logic mapping source path to object file name
We select an object file name based on the path to its source file.
Localize the logic for shortening this via relative paths.  It does not
need to use the generator-wide relative path conversion rules because we
are not actually generating a relative path that needs to be consistent
with anything else.
2021-05-17 10:03:43 -04:00
Brad King 4cb6a53bf5 cmListFileCache: Simplify relative path conversion in backtraces
Printing paths to CMake input files does not need to use the
generator-wide relative path conversion rules because we are not
actually generating a relative path for the build system that needs to
be consistent with anything else.  Instead, simply print a relative path
if it does not need to start in `../`, and otherwise an absolute path.
2021-05-17 10:03:33 -04:00
Brad King 5b3a71a83f cmSystemTools: Adopt RelativeIfUnder helper
This returns a relative path if it does not start in `../`.
2021-05-17 10:02:16 -04:00
Brad King ea9b1d36b8 cmStateDirectory: Clarify relative path top selection logic
Re-implement the same algorithm using direct iteration without
collecting a vector first.
2021-05-17 10:02:16 -04:00
Brad King 2d9109df7c cmStateDirectory: Remove network path logic from relative path top selection
The logic skipping relative paths for build trees on network paths came
from commit b5035770bc (BUG: On Windows network paths do not really
work..., 2003-12-24, v2.4.0~3517).  However, since commit ad4055f3e2
(ENH: Set RelativePathTopSource and RelativePathTopBinary independently
..., 2007-03-07, v2.6.0~2061) we effectively ignore this logic if the
build tree is inside the source tree on a network path.  Also, it is not
clear that logic using `RelativePathTopBinary` is prepared for it to be
empty.  Remove the logic for now.  If a problem comes up, we can choose
a new approach.
2021-05-17 10:02:16 -04:00
Brad King b4f07bfe5a cmStateDirectory: Fix comment on relative path top directory selection
Fix the comment added by commit f6d4fa63f8 (cmStateDirectory: Comment
relative path top directory selection approach, 2021-05-13) to describe
the actual behavior.
2021-05-17 10:02:16 -04:00