Commit Graph

237 Commits

Author SHA1 Message Date
Brad King
8214004200 Merge topic 'GNU-linker-pushpop_state-detection' into release-4.0
d5be7c7f31 Linker: Detect GNU push-state/pop-state flags more robustly
7b552b9a64 Linker: Save GNU push-/pop-state detection with compiler inspection results
a9b126b0da Linker: Save linker inspection results with compiler inspection results
3f5f2b2d49 Linker: Honor CMAKE_<LANG>_LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10468
2025-03-21 08:07:13 -04:00
Marc Chevrier
7b552b9a64 Linker: Save GNU push-/pop-state detection with compiler inspection results
Previously we saved it in the cache, which:

* Persists even if a new version of CMake changes how the check works.
* Does not propagate to `try_compile` checks.
2025-03-20 11:00:02 -04:00
Marc Chevrier
a9b126b0da Linker: Save linker inspection results with compiler inspection results
Reconfigure `CMake<LANG>Compiler.cmake` again after linker information
is detected.
2025-03-20 11:00:02 -04:00
Brad King
4223b2410f Merge topic 'ASM_MARMASM-config' into release-4.0
9b5915c178 MARMASM: Fix loading linker information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10487
2025-03-18 09:18:47 -04:00
Marc Chevrier
9b5915c178 MARMASM: Fix loading linker information
Fix misspelled `ASM_DIALECT` variable value.
2025-03-17 12:02:38 -04:00
Kitware Robot
de273b2e11 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Brad King
283a48403f CPack/RPM: Fix detection of RPM support for weak dependencies
Add a missing `find_program` call to populate `RPM_EXECUTABLE`.
This was left out of two previous changes that intended to query
the `rpm` executable:

* In commit 9b53eca317 (CPack/RPM: Fix weak dep support, 2021-06-29,
  v3.21.0-rc2~4^2), without `RPM_EXECUTABLE` the query always failed,
  so we were concluding that weak dependencies are not supported even
  when they are.

* In commit 488de6294a (CPack: correctly perform querytags on old
  versions of RPM, 2025-01-09, v4.0.0-rc1~182^2~3), without
  `RPM_EXECUTABLE` the query always failed.  This change has not
  yet been in a release anyway.

Also fix the test case for the "suggests" field to verify this.

Issue: #22350
Reported-by: Balazs Kosaras <balazskosaras@gmail.com>
2025-02-28 17:24:44 -05:00
Brad King
ab4e74ad0b CPack/RPM: Remove redundant conditions for presence of rpmbuild
If `rpmbuild` is missing, error out early.

While at it, drop unfinished `alien` support.
2025-02-28 17:06:47 -05:00
Robert Maynard
a745b6869e CUDA/Clang: Update architectures supported by CUDA 12.8 2025-02-04 12:21:16 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King
90d814f024 CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King
1150fae89a CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
makise-homura
488de6294a CPack: correctly perform querytags on old versions of RPM
In some versions of RPM, e.g. 4.0.4, rpmbuild does not understand
--querytags parameter, but rpm does. Such behavior was found on
Alt Linux P10 and Alt Linux Sisyphus (e2k).
2025-01-17 07:37:22 +03:00
Alex Turbov
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Marc Chevrier
d2997ab601 Linker configuration: Add missing platforms
The following platforms were missing:
* Android
* WindowsCE, WindowsPhone, WindowsStore and WindowsKernelModeDriver

And enhance various Apple platforms support (iOS, tvOS, etc...)

Fixes: #26439
2024-11-12 16:46:54 +01:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Edoardo Bortolozzo
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list
Remove some edge cases where if CPACK_DEBIAN_PACKAGE_DEPENDS is a list
it would not be expanded on all components leaving some with ';'(s) in
the Depends field of the control file.
Same goes for using CPACK_DEBIAN_PACKAGE_SHLIBDEPS.
2024-10-03 08:52:14 -04:00
Brad King
4aca6d8327 Merge topic 'cpack-nuget-native'
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9829
2024-09-20 10:05:53 -04:00
Diego Dassie
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups
Add the `native0.0` framework to the list of allowed frameworks allowing
native (C/C++) NuGet packages. This extends commit 0f4d3664a9
(CPack/NuGet: Build dependencies in groups, 2024-06-01, v3.30.0-rc1~18^2).

Fixes: #26305
2024-09-19 08:21:38 +02:00
Aliaksandr Averchanka
9e95bd49f2 Check*: Add option to pass link directories into checks 2024-09-09 17:06:33 +03:00
scivision
e8fd9ba8e8 CheckCompilerFlag: Add support for LLVMFlang
Make checks like

    check_compiler_flag(Fortran "-Wall" HAVE_WALL)

work with LLVMFlang.
2024-08-29 13:37:37 -04:00
Brad King
860d9b4f37 Merge topic 'swift-linker-config'
a34756b622 Swift: Fix typo in linker configuration logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9745
2024-08-20 11:46:50 -04:00
Saleem Abdulrasool
a34756b622 Swift: Fix typo in linker configuration logic
Fix a typo from commit c1c4cf9545 (Linker configuration: introduce a new
architecture, 2024-06-05): `Swoft` => `Swift`.

Reported-by: Evan Wilde <etceterawilde@gmail.com>
2024-08-19 14:04:38 -04:00
raspopov
e8b9eebd63 CPack/InnoSetup: Template file in UTF-8 BOM to support Unicode 2024-08-15 20:05:21 +03:00
Marc Chevrier
c1c4cf9545 Linker configuration: introduce a new architecture
A new set of files are dedicated to linker configuration.
This set of files enable a fine-tuned configuration based of the linker
type as identified during compiler detection.

Fixes: #25360
2024-07-20 19:05:54 +02:00
Brad King
639346f319 Merge topic 'ios-mac-catalyst'
2785364b7b iOS: Add support for Mac Catalyst

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9595
2024-07-08 11:13:09 -04:00
Raul Metsma
2785364b7b iOS: Add support for Mac Catalyst
Issue: #20132
Signed-off-by: Raul Metsma <raul@metsma.ee>
2024-07-03 11:15:45 -04:00
Joel Johnson
fab5c030ad CPack/RPM: Add zstd compression support
Fixes: #26088
2024-07-01 12:17:24 -04:00
Joel Johnson
a25be17bc4 CPack/RPM: emit error on invalid CPACK_RPM_COMPRESSION_TYPE 2024-07-01 12:16:44 -04:00
Joel Johnson
7e21412f47 CPack/RPM: fix whitespace alignment prior to editing 2024-07-01 12:16:35 -04:00
Brad King
a20377e41a Merge topic 'cpack-debian-multiarch'
71c631c435 CPack/DEB: Add Multi-Arch support
55524c48a4 CPack/DEB: Add Multi-Arch support
a022705a2e Tests/RunCMake/CPack: Improve README

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9609
2024-06-26 08:44:02 -04:00
Robert Schuster
55524c48a4 CPack/DEB: Add Multi-Arch support
Add support for Multi-Arch in control files of Debian packages.
Valid values: same, foreign, allowed

Fixes: #21445
2024-06-21 12:27:50 -04:00
Adrian DC
f73ad97220 CPack/RPM: Fix debuginfo permissions check
Replace non-existent 'USER_EXECUTE' with intended 'OWNER_EXECUTE'.

Signed-off-by: Adrian DC <radian.dc@gmail.com>
2024-06-17 11:54:16 -04:00
Brad King
614100dbf6 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower
In commit 60661f6770 (CPack/WiX: Make InstallScope configurable,
2023-11-07, v3.29.0-rc1~413^2) the `CPACK_WIX_INSTALL_SCOPE` default was
set to `perMachine`.  While installers created with `perMachine` have
better behavior on their own than installers created without any
`InstallScope`, they do not cleanly convert existing installations on
updates.

Fixes: #26029
2024-06-05 14:01:14 -04:00
Brad King
57c6dd277e Merge topic 'cpack-nuget-dependency-groups'
0f4d3664a9 CPack/NuGet: Build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9544
2024-06-04 08:59:28 -04:00
Alex Opie
0f4d3664a9 CPack/NuGet: Build dependencies in groups
This allows particular frameworks to be targeted by
particular dependencies, and for empty dependency
groups to satisfy NuGet's framework-matching
requirements.
2024-06-03 11:28:49 -04:00
Deniz Bahadir
27d161eac3 CPackDeb: dpkg-shlibdeps shall consider dependency components, too
When using `dpkg-shlibdeps` to automatically determine package
dependencies it considers the RUNPATH/RPATH of executables in order to
find all required shared libraries of such executables.

If the RUNPATH/RPATH contains a verbatim `$ORIGIN` (respective
`${ORIGIN}`), it will now be substituted by the packaging-paths of other
components that are marked as dependency and those paths will then be
used as additional search directories for `dpkg-shlibdeps`.

Associated tests were added as well.

Fixes: #21838
2024-05-30 16:13:46 +02:00
Deniz Bahadir
a1af593291 CPack: Support arbitrary component name when packaging
CPack no longer blindly tries to create temporary packaging
(sub)directories that contain the verbatim name of a component, which
might contain characters that are not supported on the platform /
filesystem.
Instead, if the component's name contains a (possibly) problematic
character its MD5 hash will be used for that temporary packaging
(sub)directory.

Likewise, if the component's name resembles a reserved device name (e.g.
"COM1" on Windows) then the temporary packaging (sub)directory will get
this name prefixed with an underscore.
Similar, if it ends in a dot (on Windows) then the temporary packaging
(sub)directory will get this name suffixed with an underscore.

Fixes: #23612
2024-05-01 19:20:32 +02:00
Deniz Bahadir
208b3f63ac CPackDeb.cmake: Fix debug message 2024-04-30 18:36:26 +02:00
Brad King
8b3d48ab94 Merge topic 'save-restore-PACKAGE_PREFIX_DIR'
41f4e1c457 CMakePackageConfigHelpers: Document PACKAGE_PREFIX_DIR for public use
c5231ba29e find_package: Save/restore PACKAGE_PREFIX_DIR
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
bf88879f1f generate_apple_architecture_selection_file: Avoid early returns
a4ac2c92f4 Help: Add missing section heading for apple architecture selection
b7fcc44be9 Help: Fix CMakePackageConfigHelpers typos, grammar and formatting
f1cacaa830 Tests/RunCMake/CMakePackage: Define variable closer to where it is used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9430
2024-04-22 08:42:13 -04:00
Craig Scott
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
Issue: #25827
2024-04-19 11:41:12 -04:00
Brad King
ad13d01621 Merge topic 'cmp0159_warnings'
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9385
2024-04-01 09:43:14 -04:00
Juan Ramos
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
2024-03-29 13:51:59 -07:00
Brad King
03884f4f32 CPack/WIX: Add support for WiX Toolset v4
Add a `CPACK_WIX_VERSION` option to specify version WiX for
which the project is configured.

Fixes: #23910
2024-03-24 15:26:39 -04:00
Brad King
ac25c645a7 CPack/WIX: Improve formatting of CPACK_WIX_CUSTOM_XMLNS expansion 2024-03-22 09:58:42 -04:00
Brad King
d2f4836f8e CPack/WIX: Prepare to provide version-specific WiX templates
Move our template for WiX Toolset v3 to a versioned location.
2024-03-22 09:51:06 -04:00
Brad King
9ef00786b2 Merge topic 'package-dispatch-apple'
85d6d3b2e3 generate_apple_*_selection_file: Add option to capture errors
2149dbd379 generate_apple_architecture_selection_file: Document $(ARCHS_STANDARD) support
be642f6ed5 generate_apple_architecture_selection_file: Simplify signature
8959ad9db1 Tests/RunCMake/CMakePackage: Fix Apple architecture selection argument order
677f3d721b Tests/RunCMake/CMakePackage: Add architecture i386 for macOS on Xcode < 10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9349
2024-03-20 09:51:45 -04:00
Brad King
3135a99467 Merge topic 'package-dispatch-apple' into release-3.29
85d6d3b2e3 generate_apple_*_selection_file: Add option to capture errors
2149dbd379 generate_apple_architecture_selection_file: Document $(ARCHS_STANDARD) support
be642f6ed5 generate_apple_architecture_selection_file: Simplify signature
8959ad9db1 Tests/RunCMake/CMakePackage: Fix Apple architecture selection argument order
677f3d721b Tests/RunCMake/CMakePackage: Add architecture i386 for macOS on Xcode < 10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9349
2024-03-20 09:51:43 -04:00