Commit Graph

82 Commits

Author SHA1 Message Date
Alex Sweet
9b53eca317 CPack/RPM: Fix weak dep support
RPM 4.11.3 for el7 contains backported support for the RPM weak dep tags.
It only supports querying those tags, but rpmbuild can not make use of them.
Since CPack relies on rpmbuild --querytags to check for support, this
commit switches to rpm --suggests to check for support of weak
dependencies.

Fixes: #22350
2021-06-29 11:14:54 -04:00
Marc Aldorasi
701773f1da CheckCompilerFlag: Handle -Werror= for GCC 11 2021-06-17 13:39:48 -04:00
Brad King
7aad9e8685 Merge topic 'add_hip_language'
8514ee9b31 HIP: analyze output of `hipcc` to determine default GPU architecture
20d086f1a2 HIP: All HIP tests now run on CMake's current AMD hardware
2e86e50c2f HIP: Add HIP to all the Check* modules
947dbed0aa HIP: Automatically inject the `hip::device` runtime target
b50bfc8913 HIP: Add language to CMake
ff0d2858e1 HIP: Extract clang compiler details from hipcc
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake
590553f322 Compilers: protect use of  __has_include
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6121
2021-06-09 07:53:32 -04:00
Robert Maynard
2e86e50c2f HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Ben Boeckel
ed1f3a5fa5 CPackDeb: output the error message when no description can be made
The `message` command does not support automatic dereferencing.
2021-06-07 07:11:44 -04:00
Markus Israelsson
79f48da5c2 CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exe
If a previous installation was detected by the NSIS script the
uninstaller was not correctly run unless it was still named
`Uninstall.exe`.  This meant that using `CPACK_NSIS_UNINSTALL_NAME`
was simply broken.

Fixes: #22103
2021-04-27 14:06:42 -04:00
Domen Vrankar
34c8a23044 CPackRPM: add scriplets tags only if scripts exist
Scriplet tags should not be added to generated
spec files if scripts weren't provided as those
tags are otherwise present in generated rpm file
even if the script wasn't provided thereby
generating unneeded dependency on shell.

Fixes: #21345
2021-04-01 22:28:24 +02:00
Brad King
ac79fd8a0e Merge topic 'cpackrpm-debuginfo-single-package-install-erase-scripts'
31c184ad69 CPackRPM: handle scripts in debuginfo single package mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5953
2021-04-01 10:25:28 -04:00
Domen Vrankar
31c184ad69 CPackRPM: handle scripts in debuginfo single package mode
Enabling CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE while
using rpm install or erase scripts resulted in
resulted missing scripts for non default components.

Fixes: #21974
2021-03-30 23:24:16 +02:00
Domen Vrankar
d0adb2386a CPackRPM: correctly handle empty dir in single package mode
Enabling CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE while
having an empty directory in non main component
resulted in packaging error that the directory
does not exist.

Fixes: #21951
2021-03-29 01:26:58 +02:00
Johnny Jazeix
0aabeb0c30 CPack/NSIS: Add option for setting branding text
See https://nsis.sourceforge.io/Reference/BrandingText
for more information.

Fixes: #21479
2021-02-07 16:10:57 +01:00
Deniz Bahadir
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs
The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these
directories will be searched by `dpkg-shlibdeps` in order to find
private shared library dependencies of the libraries/executables that
shall be packed.
2021-01-22 08:33:01 -05:00
iorikyu
dade75509f CPack/NuGet: Fix nuspec file generation for UNIX-style OS
Use forward slashes, which should work on both UNIX and Windows.
2020-12-22 09:30:33 -05:00
Brad King
0a9f19c0ea Merge topic 'correct_check_compiler_flag_regression'
72f6b4bfbe Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kumar Gala <kumar.gala@gmail.com>
Merge-request: !5540
2020-11-30 12:37:14 -05:00
Brad King
b13961fb0f Merge topic 'check-lang-conditions'
f3d4254b3d Check*: Tolerate variables set with names of languages
01d91ae5f2 Tests: Fix RunCMake.Check* conditions for enabling Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !5536
2020-11-30 12:34:31 -05:00
Robert Maynard
72f6b4bfbe Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag
Rename the `CheckPIESupported` helper functions so that they
don't clobber other internal functions. Also rename them to
document they can't be unified with `CheckCompilerFlag`.

Fixes: #21497
2020-11-25 11:06:15 -05:00
Brad King
f3d4254b3d Check*: Tolerate variables set with names of languages
Fix the language checks added by commit 90dead024c (CheckCompilerFlag:
unified way to check compiler flags per language, 2020-09-25,
v3.19.0-rc1~88^2), commit 10ae907de0 (CheckSoureCompiles: Add a unified
way to check if a source compiles, 2020-09-14, v3.19.0-rc1~118^2~1), and
commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a
source runs, 2020-09-14, v3.19.0-rc1~118^2) to work when variables of
the language names are set.

Fixes: #21500
2020-11-25 09:11:21 -05:00
Andrew Fuller
c826745f5a CPack/DEB: Do not crash when asked for debug symbols when there are none
Fixes: #21356
2020-11-16 14:03:07 -05:00
Brad King
02d6c98210 Merge topic 'cpack-nuget'
41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5415
2020-11-06 08:01:41 -05:00
Bob Apthorpe
41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language
Also update the XML Schema.

Fixes: #21348
2020-11-05 10:49:25 -05:00
Brad King
301d82a6ae Merge topic 'CheckSourceRuns-compatibility'
a524bf3aa7 CheckSourceRuns: do not fail on unrecognized arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5426
2020-10-30 09:51:35 -04:00
Ben Boeckel
a524bf3aa7 CheckSourceRuns: do not fail on unrecognized arguments
The old `check_X_source_runs` modules did not verify the arguments, so
we cannot start doing it now. Downgrade the hard error introduced in
commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a
source runs, 2020-09-14) via !5223 into a noisy warning.
2020-10-28 15:06:02 -04:00
Brad King
967fb42d47 Merge topic 'check-module-name-conflicts'
d192918586 Modules: Do not implicitly add new functions via old Check Modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5424
2020-10-27 07:02:50 -04:00
Robert Maynard
d192918586 Modules: Do not implicitly add new functions via old Check Modules
The conversion of Check<Lang>CompilerFlag, SourceCompiles, and
SourceRuns over to the new functions has the possibility of breaking
projects that had functions with those existing names.

To reduce the possibility of collisions we now have all the
legacy code call functions that start with `cmake_`, and users
will need to explicitly include the new modules to get the
non-prefixed versions

Fixes: #21359
2020-10-26 10:57:55 -04:00
Johnny Jazeix
c92b96234a CPack/NSIS: Template file in UTF-8 BOM to support Unicode
Fixes: #21318
2020-10-19 19:53:56 +02:00
Fritz Elfert
267de3ba30 CPack/WiX: Add support for custom XML namespaces
Add a `CPACK_WIX_CUSTOM_XMLNS` option to specify these.

Fixes: #21098
2020-08-18 07:50:49 -04:00
Jean-Christophe Fillion-Robin
207373802e Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme

The following command was used:

```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Raul Tambre
6636693134 FindCUDAToolkit: Re-unify with Internal/CUDAToolkit
A portion of FindCUDAToolkit was previously split in commit dc2eae1f
(FindCUDAToolkit: Factor out discovery code into a separate file, 2020-04-22)
out into Internal/CUDAToolkit to allow re-use of the code in
CMakeDetermineCUDACompiler for Clang support.

This has turned out to be a bad solution due to Clang requiring quite a bit of
special handling and special handling for NVCC leaking out from
Internal/CUDAToolkit into the Clang code using it.

Thus it seems better to re-unify this code and duplicate the parts of the code
necessary for Clang where it's required. This will help us get logic correct
for both NVCC and CUDA handling. We can still unify the common parts in the
future once the code has matured.
2020-06-12 21:49:15 +03:00
Brad King
a1af643291 Merge topic 'fix-cpack-deb-generating-empty-paragraph'
6ba842163c CPack-deb: don't add a line with a dot to pkg desc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4806
2020-05-28 06:50:40 -04:00
Jonathan Verner
6ba842163c CPack-deb: don't add a line with a dot to pkg desc
Currently, if the package description ends with a newline
(typically if it is read from a file) cpack -deb adds a single line
with a dot at the end which leads to a violation of the
`extended-description-contains-empty-paragraph` debian policy.

This commit fixes the above behaviour.

Fixes: #20763
2020-05-27 14:44:28 -04:00
Raul Tambre
f2df6f5446 CUDA: Check for lib/x64 library directory in Internal/CUDAToolkit
Fixes #20755.
2020-05-26 19:05:22 +03:00
Raul Tambre
dc2eae1f91 FindCUDAToolkit: Factor out discovery code into a separate file
This allows for re-use in other parts of the code, that require the CUDA
toolkit location, but can't or may not want to use the full
`FindCUDAToolkit`.
2020-05-15 17:46:51 +03:00
Johnny Jazeix
d6840a4f3c CPack/NSIS: Add option for setting DPI-aware
See https://nsis.sourceforge.io/Reference/ManifestDPIAware
for more information.

Fixes: #17724
2020-04-14 13:47:49 +02:00
Sarang Joshi
c0534c4a68 CPackRPM: Add PRE_/POST_TRANS scripts
Add variables for PRE_TRANS and POST_TRANS scripts.

Fixes: #18917
2020-02-24 14:31:38 -05:00
Yacoub Hossain
e6c470997f CPack/NuGet: Provide more granular errors
Address the problem of not knowing when cpack fails to create a nuget
package which occurs when creating multiple nupkgs.

Fixes: #20094
2020-02-17 11:01:08 -05:00
Brad King
64e3bb4aee Merge topic 'cpack-deb-fix-description'
baec299ecd CPack: Fix regression in Deb description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4271
2020-01-27 09:27:36 -05:00
Kyle Edwards
baec299ecd CPack: Fix regression in Deb description
Fixes: #20254
2020-01-24 08:50:43 -05:00
Brad King
e61c2ed9ac Merge topic 'fix-cpack-deb-description-file'
d491f34a5e CPack: Fix regression in DEB generator description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4204
2020-01-13 10:23:26 -05:00
Kyle Edwards
d491f34a5e CPack: Fix regression in DEB generator description
Fixes: #20102
2020-01-10 17:22:52 -05:00
Patrick Storz
9d2816544e CPack/NSIS: Also preload the "UserInfo.dll" plugin
This is currently used to provide
UserInfo::GetName and UserInfo::GetAccountType functions.
2020-01-04 18:20:27 +01:00
Patrick Storz
13567bd186 CPack/NSIS: Avoid "setup loading" screen by fixing template order
NSIS packages files (including those required by the installer itslef)
in the order in which they're mentioned in the .nsi file.

If solid compression is used, the installer might need to extract
large parts of the archive to be able to even start the setup program
("Please wait while setup is loading...").

Avoid this by moving component installation towards the end of the
template file.
2020-01-04 18:18:18 +01:00
Brad King
4fb9c88042 Merge topic 'add_cuda_meta_compiler_features'
2467a2b318 CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3992
2019-12-12 11:57:18 -05:00
Kyle Edwards
651b5d157a Merge topic 'cpack-use-CPACK_PACKAGE_HOMEPAGE_URL'
3476dbe6d7 CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4024
2019-12-11 10:59:29 -05:00
Robert Maynard
2467a2b318 CUDA: Add cuda meta-features (e.g. `cuda_std_11`) support 2019-12-10 17:56:48 -05:00
Alex Turbov
3476dbe6d7 CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URL
At CPack running time the `CMAKE_PROJECT_HOMEPAGE_URL` variable
is not set.

Internal CPack modules (e.g. CPackDEB, CPackRPM, CPackFreeBSD)
should use `CPACK_PACKAGE_HOMEPAGE_URL` instead, which is available
after inclusion of `CPack.cmake` into `CMakeLists.txt`.

Closes: #19607
2019-12-09 17:06:10 -05:00
Yacoub Hossain
161a19e547 CPackNuGet: Fix handling of version specs with '['
Build a string directly to avoid depending on CMake lists which do
not handle square brackets in values very well.

Fixes: #20010
2019-12-06 09:14:36 -05:00
yacoub
26367b4bb2 CPack/NuGet: Do not mangle non-C-identifier chars in dependencies
Fixes: #19956
2019-11-14 14:48:03 -05:00
Johnny Jazeix
68b5af65fa CPack/NSIS: Add options for custom welcome/finish titles + display on 3 lines
Fixes: #11275
2019-11-05 20:09:53 +01:00
Johnny Jazeix
c97abc9688 CPack/NSIS: Add option for custom Uninstall filename
Fixes: #10728
2019-10-25 14:13:25 -04:00