Commit Graph

53178 Commits

Author SHA1 Message Date
Brad King
7cf4dfcf78 Merge topic 'update-expat'
49693fab0d cmexpat: Create expat_config.h in build within CMake itself
bea145eb25 Merge branch 'upstream-expat' into update-expat
2da34f062a expat 2021-05-23 (a28238bd)
0ac6af4457 expat: Update script to get Expat 2.4.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6157
2021-05-25 10:07:11 -04:00
Brad King
326f39dad9 Merge topic 'cpack-wix-text'
a50db66bbd CPack/WIX: Use language en-US, font Consolas, size 14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6155
2021-05-25 10:06:30 -04:00
Brad King
6b5be76b07 Merge topic 'find_cuda_deprecation'
15fda9384a FindCUDA: Improve deprecation guidance wording
e16b06f4b9 FindCUDA: Make the deprecation notice more prominent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6153
2021-05-25 10:05:45 -04:00
Brad King
52b0795d1a Merge topic 'FindVulkan-add-Headers-glslangValidator-targets'
668ba68a7a FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6154
2021-05-25 10:04:52 -04:00
Brad King
909b7a3eca Merge topic 'cmake-gui-cc-cxx-env'
c3bd5a6a2c cmake-gui: Unset empty CC,CXX on global generator change

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6151
2021-05-25 10:04:00 -04:00
Brad King
bf2717e436 Merge topic 'set-cache-keep-normal-variable'
d96eb55282 set(CACHE): do not remove normal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6146
2021-05-25 10:03:03 -04:00
Brad King
0c16774fec Merge branch 'release-3.20' 2021-05-25 10:00:34 -04:00
Brad King
2d6d77ec1d Merge topic 'cmp0082-exclude-from-all'
bf75369ed4 Merge branch 'master' into cmp0082-exclude-from-all
38f2562d5b CMP0082: Check EXCLUDE_FROM_ALL property at generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6158
2021-05-25 10:00:34 -04:00
Brad King
35a7dcb493 Merge topic 'cmp0082-exclude-from-all' into release-3.20
38f2562d5b CMP0082: Check EXCLUDE_FROM_ALL property at generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6158
2021-05-25 10:00:34 -04:00
Kitware Robot
0f553b14b4 CMake Nightly Date Stamp 2021-05-25 00:01:05 -04:00
Kyle Edwards
bf75369ed4 Merge branch 'master' into cmp0082-exclude-from-all 2021-05-24 13:57:40 -04:00
Kyle Edwards
38f2562d5b CMP0082: Check EXCLUDE_FROM_ALL property at generate time
Fixes: #22234
2021-05-24 13:56:59 -04:00
Brad King
49693fab0d cmexpat: Create expat_config.h in build within CMake itself
Expat 2.4.1 no longer supports compiling without this header.
2021-05-24 12:59:55 -04:00
PCJohn
668ba68a7a FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targets
The `Vulkan::Headers` target complements existing Vulkan::Vulkan target.
It is the same except it omits the Vulkan library which supports
applications that loads the Vulkan library in at runtime.

The `Vulkan::glslangValidator` target provides the glslangValidator
executable which is the tool for converting between shader languages
(GLSL, SPIR-V, etc.).
2021-05-24 12:53:15 -04:00
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
Brad King
bea145eb25 Merge branch 'upstream-expat' into update-expat
* upstream-expat:
  expat 2021-05-23 (a28238bd)
2021-05-24 11:41:15 -04:00
Expat Upstream
2da34f062a expat 2021-05-23 (a28238bd)
Code extracted from:

    https://github.com/libexpat/libexpat.git

at commit a28238bdeebc087071777001245df1876a11f5ee (R_2_4_1).
2021-05-24 11:38:34 -04:00
Brad King
0ac6af4457 expat: Update script to get Expat 2.4.1 2021-05-24 11:37:56 -04:00
Jake Cobb
c3bd5a6a2c cmake-gui: Unset empty CC,CXX on global generator change
On subsequent runs of configure from cmake-gui the global generator is
swapped.  So on runs other than the first it was setting CC and CXX to
empty when they were otherwise undefined.

Instead, restore them if non-empty and unset them if empty when changing
the global generator and a previous generator exists.

Fixes: #21449
2021-05-24 11:34:07 -04:00
Kitware Robot
c3b9d9b756 CMake Nightly Date Stamp 2021-05-24 00:01:10 -04:00
Kitware Robot
95df258b7f CMake Nightly Date Stamp 2021-05-23 00:01:05 -04:00
Raul Tambre
15fda9384a FindCUDA: Improve deprecation guidance wording
Simplified the text regarding adding sources to be more general as there's also
target_sources().

Improved the wording for FindCUDAToolkit to be more explicit of its usecase and
avoid using "superseded" since the common usecase of FindCUDA was superseded by
the language support.

Wording suggestions incopropated from discussion on #22203.
2021-05-22 11:39:19 +03:00
Raul Tambre
e16b06f4b9 FindCUDA: Make the deprecation notice more prominent
FindCUDA is still widely used, but has been superseded by the much more robust
native language support. However the deprecation hasn't been noticed well
enough and real-world experience shows there's still new code written to use
it.

Change this particular notice to a warning to get a hard to miss red box.
We lose the semantic meaning, but we don't want to make all notices like this.
If there are similar cases in the future requiring it would be worth adding a
custom variant of the deprecated directive.

Fixes #22203.
2021-05-22 11:38:52 +03: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
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
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
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
Marc Chevrier
d96eb55282 set(CACHE): do not remove normal variable
Fixes: #22038
2021-05-20 17:50:13 +02: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