Commit Graph

34634 Commits

Author SHA1 Message Date
Kitware Robot
3330869964 CMake Nightly Date Stamp 2023-09-26 00:01:11 -04:00
Kitware Robot
1db7ca915f CMake Nightly Date Stamp 2023-09-25 00:01:47 -04:00
Kitware Robot
8847fceac6 CMake Nightly Date Stamp 2023-09-24 00:01:12 -04:00
Kitware Robot
b26892e8a2 CMake Nightly Date Stamp 2023-09-23 00:01:12 -04:00
Brad King
122ec98dcf Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs
18158bf81c HIP: Add support for NVIDIA GPUs
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
90e23f40ee Tests/HIP/WithDefs: Clean up test case
9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image
26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8817
2023-09-22 09:19:52 -04:00
Brad King
d2655c59dc Merge topic 'cuda-factor-out-lang'
b32ea7cff0 CUDA: Factor out helper to generate CUDA architecture flags
b3a1f17567 CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURES
8617c28221 CUDA: Factor out helper for detecting native CUDA architectures
0db0fe7958 CUDA: Factor out helper to compute all CUDA architectures
c16f1e2b93 CUDA: Factor out helper to find CUDA Toolkit for compiler
a6841a967b CUDA: Factor out helper to filter implicit link libraries
deff0e638d CUDA: Factor out helper to parse NVCC implicit compiler and linker flags
e1b2a5062f CUDA: Factor out some NVCC compiler information
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8816
2023-09-22 09:18:53 -04:00
Brad King
2dafd1f092 Merge topic 'macOS-system-framework-link'
3bdf95f942 macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linked

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8825
2023-09-22 09:07:11 -04:00
Kitware Robot
cc49d22e62 CMake Nightly Date Stamp 2023-09-22 00:01:16 -04:00
Brad King
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -04:00
Brad King
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
2023-09-21 15:34:37 -04:00
Brad King
b32ea7cff0 CUDA: Factor out helper to generate CUDA architecture flags
Prepare to use it for other languages.
2023-09-21 15:34:28 -04:00
Marc Chevrier
3bdf95f942 macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linked
Fixes: #25263
2023-09-21 16:29:40 +02:00
Brad King
f83790af0b Merge topic 'fileset-private-dep'
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8420
2023-09-21 09:39:56 -04:00
Kitware Robot
4ac624debc CMake Nightly Date Stamp 2023-09-21 00:01:19 -04:00
Martin Duffy
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can
model using file sets.  Add policy CMP0154 to treat generated sources
as private by default in targets with file sets.  Generated public
headers can be specified in public file sets.

Fixes: #24959
Issue: #15555
2023-09-20 10:25:24 -04:00
Brad King
787dde5569 Merge topic 'fortran-in-custom-targets'
d870a47e23 Tests/FortranModules: add a test for iface Fortran sources
e3d511fb9c Tests/FortranModules: also test INTERFACE targets with Fortran sources
978b68d3bb add_custom_target: Fix regression with Fortran sources
619aca80ae Tests/FortranModules: add a test case for #25223
45513c1a69 Tests/FortranModules: move issue 25112 fix from FortranOnly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8814
2023-09-20 10:16:18 -04:00
Brad King
7b1e930b0f Merge topic 'remove-redundant-stat'
d49ea4a4d9 Source: Remove redundant FileIsDirectory checks
f5ff17fcf2 Source: Remove redundant FileIsSymlink checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8810
2023-09-20 09:48:36 -04:00
Brad King
3a21087282 Merge topic 'cache-ldconfigpaths'
f173ca21ca cmBinUtilsLinuxELFLinker: Cache ldconfig results

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8811
2023-09-20 09:46:38 -04:00
Ben Boeckel
978b68d3bb add_custom_target: Fix regression with Fortran sources
Since commit 74b1d6caf3 (cmComputeLinkInformation: compute link info for
module-using targets, 2023-09-05, v3.27.5~7^2) we accidentally try to
compute link information for custom targets if they have Fortran
sources.  For module dependencies, we only need to consider target types
that can compile.

Fixes: #25252
2023-09-20 09:14:58 -04:00
Kitware Robot
de7c036304 CMake Nightly Date Stamp 2023-09-20 00:01:12 -04:00
Brad King
711de9aef6 cmGeneratorTarget: Clarify local variable names for device architectures 2023-09-19 11:31:23 -04:00
Atılhan Emre Dursunoğlu
f173ca21ca cmBinUtilsLinuxELFLinker: Cache ldconfig results
Running GetLDConfigPaths in every ScanDependencies is expensive.
2023-09-19 17:38:25 +03:00
Brad King
26578aadc4 Merge topic 'script_file_exists'
ca77b745e9 cmake: Clarify error if -P script does not exist

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8809
2023-09-19 09:05:45 -04:00
Kitware Robot
62df021464 CMake Nightly Date Stamp 2023-09-19 00:01:12 -04:00
scivision
d49ea4a4d9 Source: Remove redundant FileIsDirectory checks 2023-09-18 23:11:28 -04:00
scivision
f5ff17fcf2 Source: Remove redundant FileIsSymlink checks
Replace `FileExists || FileIsSymlink` with `PathExists`.
The latter does not resolve symlinks, so this is OK for use
with broken symlinks, files, and directories.
2023-09-18 16:35:10 -04:00
scivision
ca77b745e9 cmake: Clarify error if -P script does not exist 2023-09-18 11:51:31 -04:00
Kitware Robot
0846414ba2 CMake Nightly Date Stamp 2023-09-18 00:01:42 -04:00
Kitware Robot
aa6213848d CMake Nightly Date Stamp 2023-09-17 00:01:14 -04:00
Kitware Robot
9aab118785 CMake Nightly Date Stamp 2023-09-16 00:01:14 -04:00
Brad King
9a0abcb7b6 Merge topic 'find-windows-no-PATH-prefixes'
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8802
2023-09-15 08:56:40 -04:00
Kitware Robot
52cd2ea0f1 CMake Nightly Date Stamp 2023-09-15 00:01:16 -04:00
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
7d3b4868d0 CMake 3.27.5 2023-09-14 13:13:14 -04:00
Brad King
5b590882fa Merge topic 'cxxmodules-non-compiled-source'
24a9b00f83 Merge branch 'cxxmodules-non-compiled-source-release' into cxxmodules-non-compiled-source
458e3974a8 cxxmodules: detect and message about non-compiled sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8773
2023-09-14 13:01:21 -04:00
Brad King
01f97f93c8 Merge topic 'cxxmodules-non-compiled-source' into release-3.27
458e3974a8 cxxmodules: detect and message about non-compiled sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8773
2023-09-14 13:01:20 -04:00
Brad King
c7af11b4d6 Merge topic 'autogen-exe-per-config'
e454314daa NinjaMultiConfig: Update tests for the new dependency change
fddd0f0443 Autogen: AUTO*_EXECUTABLE: add support for per-config values
10b09647f2 RunCMake: Add RunCMake_TEST_EXPECT_RESULT
cac2e029f0 cmQtAutoGenInitializer: Define CrossConfig variable
d4889361f0 cmQtAutoGenInitializer: Reduce string copies
0bf49d5579 cmQtAutoGenInitializer: Remove no-op call
94c4c1cb28 cmQtAutoGenInitializer: Improve Const-Correctness
6d54c36859 Autogen: Fix typo
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8564
2023-09-14 13:00:13 -04:00
Kitware Robot
dd282961b9 CMake Nightly Date Stamp 2023-09-14 00:01:12 -04:00
Orkun Tokdemir
fddd0f0443 Autogen: AUTO*_EXECUTABLE: add support for per-config values
* Per-config values were added to `AUTO*_EXECUTABLE`.
* Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to
  avoid unnecessary rebuilds.
* A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used.
* The timestamp target was split into three targets for per-config to avoid redundant `mocs_compilation` builds.
* Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `CMAKE_CROSS_CONFIG` usage.
* Some functions were refactored to avoid code duplication.

Fixes: #20074
2023-09-13 18:23:56 +02:00
Orkun Tokdemir
cac2e029f0 cmQtAutoGenInitializer: Define CrossConfig variable 2023-09-13 15:59:54 +02:00
Orkun Tokdemir
d4889361f0 cmQtAutoGenInitializer: Reduce string copies 2023-09-13 15:58:47 +02:00
Orkun Tokdemir
0bf49d5579 cmQtAutoGenInitializer: Remove no-op call 2023-09-13 15:58:47 +02:00
Orkun Tokdemir
94c4c1cb28 cmQtAutoGenInitializer: Improve Const-Correctness 2023-09-13 15:58:47 +02:00
Orkun Tokdemir
6d54c36859 Autogen: Fix typo 2023-09-13 15:58:47 +02:00
Orkun Tokdemir
972cfd1bc3 cmCustomCommandGenerator: Fix GetInternalDepfile on moved instance
Previously the constructor captured `this` in a lambda used by the
`GetInternalDepfile` method, but the pointer is invalidated when the
instance moves.
2023-09-13 15:58:47 +02:00
Brad King
7f5d5f6e5a Merge topic 'ninja-cc-local'
0f16ebf333 cmNinjaTargetGenerator: Reduce lifetime of custom command list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8800
2023-09-13 08:44:11 -04:00
Brad King
a8c50d6faf Merge topic 'orkun_21677_16_06_2023'
09b650d000 Autogen: Move QtAutoMocDeps tests to RunCMake/Autogen
ebc9e448b3 Autogen: Add depfile support for Makefiles
e5358b9d8d RunCMake: Add RunCMake_TEST_NOT_EXPECT variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8570
2023-09-13 08:42:55 -04:00
Brad King
3f8dc08ce5 Merge topic 'automoc-macro-names'
42adf3cba8 Autogen: Evaluate INTERFACE_AUTOMOC_MACRO_NAMES efficiently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8799
2023-09-13 08:41:11 -04:00
Kitware Robot
8675a6ce40 CMake Nightly Date Stamp 2023-09-13 00:01:16 -04:00
Brad King
0f16ebf333 cmNinjaTargetGenerator: Reduce lifetime of custom command list
Since commit 2583eff6fe (ninja: Factor out custom command order-only
depends, 2014-03-10, v3.1.0-rc1~559^2) we can store the list of custom
commands in a local variable rather than a member.
2023-09-12 15:04:15 -04:00