Commit Graph

13655 Commits

Author SHA1 Message Date
Brad King
81e836e0fe Merge topic 'vs-ifx'
43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files
5c77facd78 VS: Fix Intel plugin version detection fallback

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9001
2023-11-27 08:41:55 -05:00
Brad King
43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files
Add a `fortran={ifort,ifx}` field to `CMAKE_GENERATOR_TOOLSET` to
specify which Intel Fortran compiler to use.

Fixes: #25427
2023-11-22 10:22:12 -05:00
Brad King
d0dc8eea2f Merge topic 'gfortran-flags'
4597fee41f GNU: Remove duplicate and unnecessary optimization flags for gfortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8994
2023-11-22 07:24:01 -05:00
Brad King
874b62abb4 Merge topic 'clang-scan-deps-failed-scan'
77a7edb73f Clang-CXX: copy into the dyndep output on success

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Namniav W <namniav@gmail.com>
Merge-request: !8991
2023-11-22 07:20:05 -05:00
Ben Boeckel
77a7edb73f Clang-CXX: copy into the dyndep output on success
When `clang-scan-deps` fails to scan (e.g., bad source syntax, junk
flags, etc.), the redirection unconditionally updates the file. If this
fails, the `.ddi` file timestamp is updated. If the state is then
reverted (e.g., the command line returns to the state of the last
successful build), the updated file is not useful, but `ninja` does not
rerun because:

- the command hash matches the last successful run
- the output file is newer than its inputs

However, since the `.ddi` file has been updated with bogus contents from
a failed scan, collation fails as the `rules` array is empty (or
incomplete from a batch scan).

If `clang-scan-deps` were properly aware of its output file, it could
use this to not write the file if any inner scan fails. Requested in
https://github.com/llvm/llvm-project/issues/72875.

See: https://github.com/llvm/llvm-project/issues/72875
Fixes: #25429
2023-11-21 09:41:59 -05:00
Brad King
4597fee41f GNU: Remove duplicate and unnecessary optimization flags for gfortran
Since commit a66004bee0 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in
toolchain files, 2016-07-05, v3.7.0-rc1~392^2) we've accidentally been
adding extra optimization flags instead of replacing unwanted flags.

Fixes: #25434
2023-11-21 08:19:15 -05:00
Brad King
15810cfbcd Merge topic 'modules-modern-foreach'
ec2ad53d18 Modules: refactor compiler find to use modern foreach

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8986
2023-11-20 08:15:26 -05:00
Brad King
4c1a6f2e23 Merge topic 'ci-fedora-39'
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39
9283b20659 ci: Suppress CPack/RPM tests pending fix for Fedora 39
18145e8745 ci: Update FindMPI test environment for mpich on Fedora 39
a8be80ccf2 ci: Drop now-unnecessary Clang rules for CXXModules tests
99238b23e9 ci: use Fedora 39 images and environments
57eadec617 ci: update Linux image to Fedora 39
653262162c clang-tidy module: Update to build against LLVM/Clang 17
2cf9a65835 clang-tidy: ignore warnings new in version 17
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8983
2023-11-20 08:10:37 -05:00
Brad King
aea838cf41 Merge topic 'cpack-wix-installscope'
60661f6770 CPack/WiX: Make InstallScope configurable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8954
2023-11-19 11:55:30 -05:00
Brad King
1f7a653e90 Merge topic 'swift-compilation-mode'
0f80101b73 Tests: Update Swift tests to use CMP0157 NEW behavior
c1d787e473 Swift: Add abstraction for compilation mode
c39384f540 Tests: Simplify RunCMake.Swift conditions to enable use of Swift

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8918
2023-11-19 11:47:37 -05:00
Michael Hirsch
ec2ad53d18 Modules: refactor compiler find to use modern foreach 2023-11-18 19:08:00 -05:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Evan Wilde
c1d787e473 Swift: Add abstraction for compilation mode
Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding
`Swift_COMPILATION_MODE` target property to control the compilation
mode.  Select among `wholemodule`, `singlefile`, and `incremental`.

Add policy CMP0157 to remove the default `-wmo` flags in favor of the
abstract setting.

Issue: #25366
2023-11-17 08:43:21 -05:00
Brad King
08f5e09f9f Merge topic 'UseSWIG-csharp-dllimport'
342b1b8a69 UseSWIG: ensure generated CSharp source code is portable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8973
2023-11-17 08:20:23 -05:00
Brad King
25fcc7e3de Merge topic 'FetchContent-find_package-args'
42dbdf8914 FetchContent: Fix syntax to forward FIND_PACKAGE_ARGS arguments correctly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8967
2023-11-17 08:19:35 -05:00
Max Gaukler
60661f6770 CPack/WiX: Make InstallScope configurable
Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope`
when using the default WiX template.  Set the default to the bug-free
value `perMachine`.

Fixes: #20962
2023-11-16 14:15:38 -05:00
Brad King
2c923a7e28 Merge topic 'install-export-xcframework'
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
a90968e044 cmExportBuildFileGenerator: Add structs for target exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8969
2023-11-16 09:13:16 -05:00
Kyle Edwards
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
Issue: #25262
2023-11-15 09:10:58 -05:00
Brad King
105ac2670b Merge topic 'doc-find_package-advice'
d007d304ff Help: FetchContent FIND_PACKAGE_ARGS REQUIRED usually inappropriate
6341267780 Help: Note ways CMAKE_..._FIND_PACKAGE_... vars can break projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8951
2023-11-15 08:38:54 -05:00
Adam Šulc
42dbdf8914 FetchContent: Fix syntax to forward FIND_PACKAGE_ARGS arguments correctly
Previously we incorrectly mixed list operations with string operations.
2023-11-15 08:22:19 -05:00
Marc Chevrier
342b1b8a69 UseSWIG: ensure generated CSharp source code is portable.
Fixes: #25405
2023-11-14 17:10:03 +01:00
Brad King
f22ecbacb6 Merge topic 'export-find_dependency-calls'
0ad8fc5a63 FetchContent: Set CMAKE_EXPORT_FIND_PACKAGE_NAME
c6e6861e63 install(EXPORT): Export find_dependency() calls
2837f592ab cmExportFileGenerator: Add function to set required CMake version
e62a3b8625 Help/export: Add signature directives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8957
2023-11-14 09:22:13 -05:00
Brad King
9b36209698 Merge topic 'FindBLAS-LAPACK-OpenBLAS-mingw'
6ce94ae0b7 Find{BLAS,LAPACK}: Fix OpenBLAS ILP64 support with MSYS2 packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8968
2023-11-14 09:10:24 -05:00
Brad King
a440c65129 Merge topic 'FindOpenMP-5.1-and-5.2'
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Markus Mützel <markus.muetzel@gmx.de>
Merge-request: !8965
2023-11-14 09:04:55 -05:00
Brad King
339cd47732 Merge topic 'FindOpenMP-5.1-and-5.2' into release-3.28
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Markus Mützel <markus.muetzel@gmx.de>
Merge-request: !8965
2023-11-14 09:04:53 -05:00
Kyle Edwards
0ad8fc5a63 FetchContent: Set CMAKE_EXPORT_FIND_PACKAGE_NAME 2023-11-13 11:07:53 -05:00
Christoph Reiter
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2
llvm 17 now defaults to openmp 5.1; see LLVM commit `0c6f2f629cc0`.
It makes FindOpenMP set OPENMP_FOUND and OpenMP_C_SPEC_DATE, but not
OpenMP_C_VERSION, because it doesn't know the version mapping.
Add the spec date to the version mapping for 5.1 and 5.2 to make
things work again.
2023-11-13 10:51:40 -05:00
Martin Köhler
6ce94ae0b7 Find{BLAS,LAPACK}: Fix OpenBLAS ILP64 support with MSYS2 packages
Typically, ILP64 BLAS libraries are suffixed with `64`, but the MSYS2
package provides the ILP64 version of OpenBLAS with a `_64` suffix.
2023-11-13 09:58:26 -05:00
Brad King
af2fb376a4 Merge topic 'link-deduplicate-libs'
7b99c42e57 Link step: Enable to configure deduplication of libraries
07501c1678 Link Step: Introduce EntriesProcessing class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8946
2023-11-13 09:51:51 -05:00
Marc Chevrier
7b99c42e57 Link step: Enable to configure deduplication of libraries
Some platforms, Apple or Windows for instance, do not require to duplicate
static libraries to resolve mutual dependencies. Moreover, Xcode version 15
emits a warning if a library is duplicated.
On Windows, enable a better control of libraries order.

Fixes: #20722, #25297
2023-11-09 19:20:40 +01:00
Brad King
2f370f69f3 Merge topic 'find_cudatoolkit_cufile_name'
b38a8e77cb FindCUDAToolkit: Search for cufile library name being lowercase

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8955
2023-11-09 09:25:27 -05:00
Robert Maynard
b38a8e77cb FindCUDAToolkit: Search for cufile library name being lowercase
Fixes #25398
2023-11-08 10:43:30 -05:00
Robert Maynard
d7642a7d42 CUDA: Support CMAKE_TRY_COMPILE_TARGET_TYPE of STATIC_LIBRARY 2023-11-07 10:48:32 -05:00
Brad King
8872da0fe4 Merge topic 'CMakeDetermineFortranCompiler-typo'
e82a8ab197 CMakeDetermineFortranCompiler: Fix typo in comment (CC -> FC)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8945
2023-11-07 09:08:33 -05:00
Craig Scott
d007d304ff Help: FetchContent FIND_PACKAGE_ARGS REQUIRED usually inappropriate 2023-11-07 21:38:10 +08:00
Sylwester Arabas
e82a8ab197 CMakeDetermineFortranCompiler: Fix typo in comment (CC -> FC) 2023-11-06 10:57:26 -05:00
Craig Scott
768690ee9a Merge topic 'FetchContent-GHS'
6a81104413 FetchContent: Pass GHS Variables to subbuild

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8930
2023-11-05 18:47:52 -05:00
William Sciaroni
6a81104413 FetchContent: Pass GHS Variables to subbuild
Fixes: #24244
2023-11-05 08:42:27 +11:00
權少
c5388bd320 CMakeFindPackageMode: Link to cmake --find-package documentation 2023-11-03 10:17:38 -04:00
Brad King
3a926cba6c Merge topic 'cuda-vs'
f0feefceb3 Merge branch 'backport-cuda-vs' into cuda-vs
79f3f29e50 CUDA: Parse NVCC implicit compile/link information in Visual Studio generators
27e64a8498 CMakeNVCCParseImplicitInfo: Recognize link.exe line in CUDA VS integration
677992d85a CMakeParseImplicitLinkInfo: Log exclusion of MSVC link /implib: flag
045399a461 CMakeParseImplicitLinkInfo: Ignore MSVC link /implib: flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8938
2023-11-02 09:35:57 -04:00
Brad King
83a85264b4 Merge topic 'Genex-LINK_LIBRARY-updates'
1b8ceaef85 Genex LINK_LIBRARY: fix some definitions for Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8936
2023-11-02 09:21:10 -04:00
Brad King
d63dbb21f0 Merge topic 'findwxwidgets-lexilla'
90b77e3783 FindwxWidgets: link with lexilla
f8831a0c9e FindwxWidgets: Convert include and library paths to cmake-style
d76242ed9f FindwxWidgets: Prevent searching libraries multiple times
55072adf16 FindwxWidgets: Improve linking with scintilla
c5e3d12213 FindwxWidgets: Move wx-config specific checks inside UNIX find-style
625023cace FindwxWidgets: Include hotfix number
35d90784e9 FindwxWidgets: use IN_LIST

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8927
2023-11-02 09:19:40 -04:00
Brad King
f0feefceb3 Merge branch 'backport-cuda-vs' into cuda-vs 2023-11-01 13:51:51 -04:00
Brad King
79f3f29e50 CUDA: Parse NVCC implicit compile/link information in Visual Studio generators
Refactoring in commit deff0e638d (CUDA: Factor out helper to parse NVCC
implicit compiler and linker flags, 2023-09-15, v3.28.0-rc1~63^2~6)
incorrectly dropped detection of the default CUDA architecture and
the CUDA toolkit include directories from the code path used for
Visual Studio generators.  However, CMakeNVCCParseImplicitInfo is
now general enough that we no longer need a VS-specific code path.

Fixes: #25378
2023-11-01 13:51:21 -04:00
Brad King
27e64a8498 CMakeNVCCParseImplicitInfo: Recognize link.exe line in CUDA VS integration 2023-11-01 13:51:10 -04:00
Brad King
677992d85a CMakeParseImplicitLinkInfo: Log exclusion of MSVC link /implib: flag 2023-11-01 13:11:14 -04:00
Brad King
045399a461 CMakeParseImplicitLinkInfo: Ignore MSVC link /implib: flag
The flag specifies the import library for the linked binary.
It is not a linked library.
2023-11-01 13:07:43 -04:00
Marc Chevrier
1b8ceaef85 Genex LINK_LIBRARY: fix some definitions for Apple platforms
Some declarations were inconsistent.
For example, "LINKER:-force_load <LIBRARY>" was translated to
"-Xlinker -force_load /path/to/library". The correct translation
should be "-Xlinker -force_load -Xlinker /path/to/library" because
the library is an argument to the -force_load option.
2023-11-01 17:11:37 +01:00
Brad King
0877babe8b Merge topic 'revert-GetPrerequisites-linux-x86'
139df0bc2f GetPrerequisites: Revert "Ignore relative paths printed by ldd"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8933
2023-11-01 09:40:01 -04:00