Commit Graph

56 Commits

Author SHA1 Message Date
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
Alex Turbov
33c7ea513d CPackDeb: Use CPACK_PACKAGE_DESCRIPTION_FILE
Also, handle per-component description nicely.
2019-09-22 00:31:24 +02:00
Alex Turbov
53be31e19c Refactor: Use list commands instead of old-way string ops 2019-09-21 23:06:30 +02:00
Alex Turbov
b2c67a7703 Style: Remove spaces after command call and ( 2019-09-08 20:29:36 +03:00
sidju
4c8741eb86 CPack/STGZ: Require explicit acceptance or refusal of license
To make using the generated STGZ easier, require a specific answer to
accepting the license terms.  Since more moves down one line when '\n'
is entered a user may hold enter to paginate through the document. This
change prevents the user from accidentally refusing the license terms by
holding enter for too long and having to start over.
2019-08-23 11:04:26 -04:00
Alex Turbov
98617f1be0 Refactor: Move CPack internal files to Internal/CPack/ directory
Some commits ago all CPack internal `*.cmake` files have been moved
to `Internal/CPack/`. This commit also move some templates
internally used by generators to the same location to make
`Modules/` directory less noisy w/ files the end users don't
need to use/see.
2019-07-09 15:45:03 +03:00
Kyle Edwards
3092c27f30 CPack: Fix SONAME regex in DEB generator
The DEB generator was written to parse output from GNU readelf.
However, LLVM's readelf has a slightly different output format,
without parentheses around the word "SONAME". Update the regex to
account for this difference.

Fixes: #19362
2019-06-12 10:13:43 -04:00
Mathieu Malaterre
8a4732c60e CPack/NuGet: Find nuget tool on case sensitive file system
There is no need to use a CamelCase executable name since it will be
handled gracefully on Windows anyway.  This change allow support for
Linux system, in particular Debian distribution where the binary is
called `nuget`.
2019-06-05 09:32:22 -04:00
Harry Mallon
d9beea0cca CPackRPM: Hide CPACK_RPM_ROOTDIR debug if not CPACK_RPM_PACKAGE_DEBUG 2019-04-30 10:52:53 +01:00
Robert Maynard
646fb1a646 CompileFeatures: memoize C++ compilers with full language level support
Previously compilers that had full support for a language standard level
were still verified every time a new build directory was created.  Now
we record this information and insert the correct granular compile
features instead of doing a `try_compile`.
2019-04-09 08:44:56 -04:00
Robert Maynard
f92ccbc306 CompileFeatures: memoize C compilers with full language level support
Previously compilers that had full support for a language
standard level was forced to verify this every time a new build
directory was created. Now we record this information and insert
the correct granular compile features instead of doing a try_compile.
2019-03-27 15:45:11 -04:00
Robert Maynard
85415afbdc CompileFeatures: Don't try_compile for language levels with no features
Previously Compilers always had to run a try_compile to determine what
language level each feature mapped to. Now we can skip the try_compile
when a language level has no features.
2019-03-20 09:10:10 -07:00
Harry Mallon
d3ffe90598 CPackRPM: Fix packaging in folders with ++ in name
Construct a regex that can match a path with special characters instead
of treating the path as a regex directly.

Fixes: #18967
2019-02-25 09:46:19 -05:00
Marc Chevrier
f255280fd9 PIE link options: Update strategy to fix performance regression
Fixes: #18700
2018-12-19 19:41:27 +11:00
Guillem Jover
38e75bb3c6 CPack/Deb: Remove paxr as a supported tar format for a .deb
The only format supported from the ones available within cpack is
gnutar, which supports large numbers encoded in base-256, and long
filenames and linknames. PAX is not and has never been a supported
format by dpkg.

Fixes: #18620
2018-11-28 09:31:28 -05:00
Marc Chevrier
c4b4d8b3a6 POSITION_INDEPENDENT_CODE: Manage link flags for executables
Fixes: #14983, #16561
2018-11-11 17:34:09 +01:00
Craig Scott
20d5e77a27 CPack: Rename Ext generator to External
Ext and External were used inconsistently in the code and the
docs. This change converts all uses of Ext to External, including
within variable names used by the generator.
2018-11-05 07:56:03 -05:00
luz.paz
6b4c5a0365 Fix misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"`
where the whitelist consists of

```
aci
ans
behaviour
buil
convertor
dum
earch
ect
emmited
emmitted
helpfull
iff
isnt
ith
lowercased
mose
nd
nknown
nto
objext
ot
pathes
pevents
splitted
substract
superceded
supercedes
te
tim
todays
uint
upto
whitespaces
```
2018-10-03 15:32:46 -04:00
Andrew Fuller
d8a3939aef CPack/Deb: Add ability to split out debug symbols into .ddeb package 2018-09-21 20:19:31 +00:00
Andrew Fuller
42fbff45e4 CPack/Deb: Use CMAKE_COMMAND to set the environment 2018-09-18 11:41:36 -07:00
Craig Scott
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module 2018-09-12 14:50:16 +08:00
Kyle Edwards
80914d88da CPack: Add "CPack External" generator
This generator doesn't actually package the files. Instead, it
provides a metadata JSON file that can be used by external packaging
software to do its own packaging. This JSON file provides information
about the components, component groups, installation types, and CMake
projects.
2018-07-02 09:51:02 -04:00
Daniel Wyatt
611ad19499 CPack/RPM: Use CMAKE_COMMAND to reference cmake executable
Ensure we use the `cmake` corresponding to the running `cpack`
even if it is not first in `PATH` or has had its name changed.
This was accidentally left out in commit v3.7.0-rc1~81^2 (CPack/RPM:
Generate source rpm (SRPM) packages on demand, 2016-09-19).
2018-06-26 13:25:08 -04:00
Kyle Edwards
48bc8b2b82 CPack: Move internal implementation modules into Internal/CPack directory
These modules are not meant to be included by user code, they are
only an internal implementation detail for CPack. Having them live
in the main Modules directory with documentation was misleading, so
they have been moved into Modules/Internal/CPack, and their
documentation has been stripped following its move into the new
"CPack Generators" section. No-op modules which contained only
documentation have been removed entirely.

The only module that hasn't been moved is CPackIFW, because it
contains user-facing macros which would be lost if it were moved.
So, the CPackIFW module has been updated with a note explaining what
needs to (eventually) happen.
2018-06-21 11:00:28 -04:00
Brad King
d49aa10768 Features: On SunPro link feature check with lang std flag
Follow up commit e17b179184 (Features: On SunPro link with language
standard compiler flag, 2017-04-28) to apply the same fix to the feature
checks.  The `try_compile` used for these is intentionally not using
`CXX_STANDARD`-based logic so that it can test the individual flags.
2017-05-09 11:22:18 -04:00
Brad King
b0996a3fa2 Features: Add meta-features requesting awareness of a particular standard
A common use case of `target_compile_features` is simply to specify that
the compiler should be run in a mode that is aware of e.g. C++11.  Some
projects simply specify a particular C++11-only feature to request this.
Provide a first-class way to do this by naming features after the
corresponding language standard.  Record them as always available in the
corresponding standard level so that requesting them always ensures that
standard (or higher) is used.
2016-11-02 10:00:28 -04:00
Brad King
8b6cc2518a Features: Centralize per-compiler recording macros
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
2016-11-02 09:51:48 -04:00