Commit Graph

222 Commits

Author SHA1 Message Date
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
Brad King
85d6d3b2e3 generate_apple_*_selection_file: Add option to capture errors
Add an option to capture error messages in a variable instead of
terminating with a fatal error.

Fixes: #25778
2024-03-19 09:52:32 -04:00
Craig Scott
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs 2024-03-19 21:47:21 +11:00
Brad King
3ed275bbb6 CPack/WiX: Fix installer status text
Previously, installers displayed extra text on some Windows versions:

    File: [1], Directory: [9], Size [6]

Add an option to our WiX templates to suppress that.

Fixes: #25634
2024-01-24 15:28:13 -05:00
Elijah Zarezky
453742ae88 CPack/RPM: Enable rpm threads during package generation
Previously, `w7.xzdio` only used a single CPU core.
Honor `CPACK_THREADS`: `w7T${CPACK_THREADS}.xzdio` uses the specified
number of threads. `w7T.xzdio` uses all available CPU cores.

Fixes: #25615
2024-01-23 12:10:35 -05:00
Brad King
f7139c3e4a Merge topic 'cuda-clang'
6251edc5a4 CUDA/Clang: Record architectures supported by Clang 16
07b7d0ceaa CUDA/Clang: Update architectures supported by CUDA 12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !9164
2024-01-19 10:56:08 -05:00
Brad King
6251edc5a4 CUDA/Clang: Record architectures supported by Clang 16 2024-01-18 12:28:14 -05:00
Brad King
07b7d0ceaa CUDA/Clang: Update architectures supported by CUDA 12
In commit 4d90f65b24 (CUDA: Update set of architectures supported by
CUDA 12, 2022-12-19, v3.26.0-rc1~120^2) we incorrectly guarded dropping
removed architectures by compiler id, but it is actually the CUDA 12
toolkit itself that removed support.
2024-01-18 12:27:53 -05:00
Brad King
1c02642ee6 Merge topic 'package-dispatch-apple'
2a398cd9b6 CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9130
2024-01-11 10:05:49 -05:00
Alex Turbov
ccde6f8048 CPack/NuGet: Add support for repository tag
Fixes: #23703
2024-01-08 11:01:29 -05:00
Alex Turbov
2c616e85cf CPack/NuGet: Add support for readme tag
Fixes: #25542
2024-01-08 11:01:06 -05:00
Brad King
2a398cd9b6 CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signatures
The helpers added by:

* commit 37bc3400cd (CMakePackageConfigHelpers: Add
                     generate_apple_platform_selection_file(), 2023-11-03)
* commit 4ac5a2f866 (CMakePackageConfigHelpers: Add
                     generate_apple_architecture_selection_file(), 2023-12-19)

were worded in terms of including package configuration files, but the
actual functionality is to include files *from* package configuration
files.  The included files do not themselves need to be usable as
package configuration files.

Rename the options and clarify the documentation accordingly.

Issue: #25262
Issue: #25516
2024-01-04 19:01:35 -05:00
Brad King
5a61984088 Merge topic 'compute-compiler-linker'
459d1cc095 Tests: Verify that linker tool is detected and identified where expected
6aec4739c1 LinkerId: Record detection steps to configure log
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output
37bc148870 LinkerId: Fix detection of linker tool without path
6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD
455aed3061 LinkerId: Fix detection of linker tool for MSVC
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9086
2024-01-04 11:53:38 -05:00
Brad King
6aec4739c1 LinkerId: Record detection steps to configure log 2024-01-03 17:07:53 -05:00
Brad King
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
Since commit c26c6ac488 (Link Step: compute effective linker used by the
compiler, 2023-05-27) we used `UNKNOWN` if the linker id is not known.
This convention is not used elsewhere, and logic using the linker id
is easier when `if(CMAKE_C_COMPILER_LINKER_ID)` is false on unknown id.
2024-01-03 17:07:52 -05:00
Brad King
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
`cmake_determine_linker_id` is only used for macOS because Apple device
platforms set `_CMAKE_FEATURE_DETECTION_TARGET_TYPE` to `STATIC_LIBRARY`,
but we might as well prepare for them anyway.
2024-01-03 17:07:52 -05:00