summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack
Commit message (Collapse)AuthorAgeFilesLines
* CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLABrad King2022-01-185-0/+22
| | | | | | | | | | | | | | | | | Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez`` commands to embed and extract resources in a disk image are deprecated. The CPack DragNDrop Generator uses these to attach the SLA specified by the `CPACK_RESOURCE_FILE_LICENSE` option. Since that option is shared by multiple CPack generators, we cannot deprecate it. Instead, add an explicit option to control the behavior. This will give projects a way to package on future macOS versions that remove the commands. In order to provide a long-term transition away from attaching SLAs to disk images, update `cpack` to default this behavior to OFF. To retain compatibility for CMake projects, teach the CPack module to default the option to ON. Later a policy can be added to change the default. Issue: #22978
* Tests: Add CPack/DMG case covering SLA from CPACK_RESOURCE_FILE_LICENSEBrad King2022-01-185-0/+31
|
* LCC: Add policy CMP0129 regarding interpreting LCC as GNUmakise-homura2021-10-211-0/+4
| | | | | | | | | | Due to MCST LCC compiler identification is now changed to LCC, there should be a way for old projects to still identify it as GNU, as it was before. This commits adds the policy: CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU. This policy controls such a behavior. OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
* LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecturemakise-homura2021-10-151-1/+2
| | | | | | | | | | | "OS Elbrus" (OSL for short), a reference Linux distro for E2K (Elbrus) platform may have broken dpkg-shlibdeps, that doesn't specify dependencies correctly. In this case, the only reliable way is to explicitly set dependencies of libc6 and lcc-libs, and then warn user to let him know this list may be incomplete. This commit does that. This fix has no effect on correctly working dpkg-shlibdeps, so when this bug will be fixed in new versions of OSL, CPack will work as expected with these distros.
* Tests/RPM: skip tests tat rely on debugedit if it's not foundmakise-homura2021-10-151-5/+22
| | | | | | There are several tests that run on systems that have rpm installed, but they fail if there's no debugedit installed also. This commit makes these tests being skipped in such case.
* Tests: fix RunCMake.CPack_DEB.EXTRA on Debian non-Linux OSesPino Toscano2021-09-181-2/+2
| | | | | | | | | The generated path with the packages uses $CPACK_TOPLEVEL_TAG, which by default is $CPACK_SYSTEM_NAME, thus the OS name. To make the expected stderr match also non-Linux OSes, accept any non-slash characters in place of "Linux", so it works also on other Debian OSes (e.g. Debian/Hurd).
* CPack/DEB: dbgsym package not generated for non-component packagingAlex Turbov2021-07-133-25/+44
| | | | Fix: #19735
* Merge topic 'ci-fixups'Brad King2021-07-061-1/+2
|\ | | | | | | | | | | | | | | 46c89c77de gitlab-ci: Rename CI config variable to avoid conflict with CMAKE_BUILD_TYPE 3ede66e17a Tests: Fix newline matching in several RunCMake.* cases Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6298
| * Tests: Fix newline matching in several RunCMake.* casesBrad King2021-07-021-1/+2
| | | | | | | | | | | | | | | | The RunCMake infrastructure's `*-stdout.txt` expected output files interpret `\n` as a `\` and `n` rather than a newline. Use a literal newline instead. Otherwise the cases that were trying to match any configuration name via `[^\n]*` would fail on `RelWithDebInfo` because it contains the letter `n`.
* | Merge topic 'cpackdeb-md5sums-order'Brad King2021-07-013-2/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | a0d3494afa Tests: update MD5SUMS test to have several files 9028195a22 CPackDeb: sort package files before generating deb file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6287
| * Tests: update MD5SUMS test to have several filesAlexey Rogachevskiy2021-06-303-2/+5
| | | | | | | | | | The test is now updated to check the order of files in the md5sums.
* | CPack/RPM: Fix weak dep supportAlex Sweet2021-06-292-11/+31
|/ | | | | | | | | | 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
* Tests: Fix RunCMake.CPack_RPM.DEBUGINFO test caseBrad King2021-06-101-0/+17
| | | | | | | Since commit c826745f5a (CPack/DEB: Do not crash when asked for debug symbols when there are none, 2020-10-29, v3.20.0-rc1~461^2) the test fails because CPackRPM warns about no sources in which to find debug symbols. Add expected output for this case.
* Tests: Improve RunCMake.CPack*.SOURCE_PACKAGE test error formattingBrad King2021-06-092-11/+28
| | | | | | | | | Format message content for `message(FATAL_ERROR)`. Apply the change from commit c54c284de7 (Tests: Improve RunCMake.CPack* test error formatting, 2021-04-22) to the `SOURCE_PACKAGE` script too. Also fix a typo from commit f5d79dec53 (Tests: Cleanup CPack message when files are expected and none are found, 2021-01-15, v3.20.0-rc1~89^2~22).
* CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLESNils Gladitz2021-05-233-0/+15
| | | | | | The new variable allows projects to define custom key=value pairs of variables to be set in CPack cmake_install.cmake script invocations. This allows install(SCRIPT|CODE) to be parameterized at runtime.
* Merge topic 'lzma-threads'Brad King2021-04-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | c5c130e675 cmArchiveWrite: Consolidate multiple ways to set thread count 5380d858ff liblzma: Enable multi threaded stream encoding support e9065e96dc Merge branch 'upstream-liblzma' into lzma-threads ee909a8e8b liblzma 2020-03-17 (2327a461) 741b85b42b liblzma: Revise update script to get version 5.2.5 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6014
| * cmArchiveWrite: Consolidate multiple ways to set thread countNils Gladitz2021-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Merge use of SetFilterOption() into more abstract thread count in cmArchiveWrite constructor. libarchive defaulting of threads for threads == 0 seems to be configuration dependent. Preemptively default thread count via std::thread::hardware_concurrency(). Also allow negative values for the thread count in which case the detected hardware concurrency is also used but the given absolute thread count is used as an upper limit.
* | Tests: Improve RunCMake.CPack* test error formattingBrad King2021-04-221-13/+23
|/ | | | Format message content for `message(FATAL_ERROR)`.
* CPackRPM: add scriplets tags only if scripts existDomen Vrankar2021-04-016-70/+86
| | | | | | | | | | 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
* Merge topic 'cpackrpm-debuginfo-single-package-install-erase-scripts'Brad King2021-04-016-2/+32
|\ | | | | | | | | | | | | 31c184ad69 CPackRPM: handle scripts in debuginfo single package mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5953
| * CPackRPM: handle scripts in debuginfo single package modeDomen Vrankar2021-03-306-2/+32
| | | | | | | | | | | | | | | | Enabling CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE while using rpm install or erase scripts resulted in resulted missing scripts for non default components. Fixes: #21974
* | CPackRPM: correctly handle empty dir in single package modeDomen Vrankar2021-03-282-1/+4
|/ | | | | | | | | 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
* Tests: Explicitly set permissions in CPack tests to avoid perimssions errorswilliam.r.dieter2021-01-291-0/+6
| | | | | | | | | | | | | When the user has the setgid bit is set on the parent directory of the build directory, the setgid bit will be propagated throughout the build tree. Most tests do not care about permissions as long as they can read and write the files the need. The CPack tests, however, validate that permissions match an expected set, and fail with the setgid bit set. Explicitly set permissions on directories created in the CPackTestHelpers to clear the setgid bit. Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
* Tests: Update CPack DEBUGINFO tests for IntelLLVMWilliam R. Dieter2021-01-281-1/+1
| | | | | | | By default icx and icpx do not add build IDs when linking, so enable the build ID to make the test pass. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* Tests: Cleanup CPack message when files are expected and none are foundWilliam R. Dieter2021-01-281-0/+5
| | | | | | | | | | | | Previously, when looking for exactly one file and the number of files was not one, the test printed out an error message saying that too many files were found, then printing the list of files. However, 0 is not 1 and also not too many files. To reduce confusion, this commit adds a different message when 0 files are found and 1 is expected. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* Tests: Update tests for NVHPC compilerTin Huynh2021-01-271-2/+2
| | | | Treat it just like PGI.
* CPack: add CPACK_THREADS variable to control compression threadsRodolfo Lima2021-01-265-4/+6
| | | | | | | This allows setting how many threads the compressor will use. Currently only implemented for XZ when using system's lzma library. Fixes: #21715
* cpack(DEB): Issue warning if custom script for control file is missingAsit Dhal2021-01-151-0/+6
| | | | Fixes: #17794
* CPack/DEB: Do not crash when asked for debug symbols when there are noneAndrew Fuller2020-11-162-1/+9
| | | | Fixes: #21356
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,\ " ```
* Tests: Cover using RTF for DMG SLAsBrad King2020-07-033-7/+11
|
* Tests: Add case for CPack DMG multi-language SLAsBrad King2020-07-0211-0/+67
| | | | | | | Add a test for the feature added by commit f88533cc06 (CPackDMG: Add support for multilingual SLAs, 2015-10-19, v3.5.0-rc1~232^2). Issue: #20889
* CPack: Introduce pre- and post- build actionsAlex Turbov2020-06-157-0/+40
| | | | | | | | | | | | | | | CPack learned the `CPACK_PRE_BUILD_SCRIPTS`, `CPACK_POST_BUILD_SCRIPTS`, and `CPACK_PACKAGE_FILES` variables. The first two are lists of scripts to perform - after pre-install files into a staging directory and before producing the resulting packages - after produsing the packages The post-build script(s) also get the list of actually produced packages in the `CPACK_PACKAGE_FILES`. Issue: #19077
* CPack External: Introduce `CPACK_EXTERNAL_BUILT_PACKAGES`Alex Turbov2020-06-053-0/+19
| | | | | | | The `CPACK_EXTERNAL_PACKAGE_SCRIPT` script may set this list variable to the full paths of generated package files. CPack copy these files from the stage directory back to the top build directory and possibly produce checksum files if the `CPACK_PACKAGE_CHECKSUM` is set.
* Merge topic 'fix-cpack-deb-generating-empty-paragraph'Brad King2020-05-281-11/+1
|\ | | | | | | | | | | | | 6ba842163c CPack-deb: don't add a line with a dot to pkg desc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4806
| * CPack-deb: don't add a line with a dot to pkg descJonathan Verner2020-05-271-11/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | cmCPackArchiveGenerator: support multithreaded compressionBen Boeckel2020-04-035-0/+20
| |
* | CPackRPM: Add PRE_/POST_TRANS scriptsSarang Joshi2020-02-242-2/+18
|/ | | | | | Add variables for PRE_TRANS and POST_TRANS scripts. Fixes: #18917
* Merge topic 'cpack-deb-fix-description'Brad King2020-01-274-7/+16
|\ | | | | | | | | | | | | baec299ecd CPack: Fix regression in Deb description Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4271
| * CPack: Fix regression in Deb descriptionKyle Edwards2020-01-244-7/+16
| | | | | | | | Fixes: #20254
* | Merge topic 'cpack-custom-dmg-names'Craig Scott2020-01-176-1/+72
|\ \ | | | | | | | | | | | | | | | | | | | | | 6d6f4b9316 CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAME b53230fbee Tests: Add DragNDrop as a testable CPack generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4227
| * | CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAMEAndrew Fuller2020-01-163-1/+7
| | |
| * | Tests: Add DragNDrop as a testable CPack generatorAndrew Fuller2020-01-163-0/+65
| | |
* | | Merge topic 'fix-cpack-deb-description-file'Brad King2020-01-132-1/+3
|\ \ \ | |/ / |/| / | |/ | | | | | | d491f34a5e CPack: Fix regression in DEB generator description Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4204
| * CPack: Fix regression in DEB generator descriptionKyle Edwards2020-01-102-1/+3
| | | | | | | | Fixes: #20102
* | Ninja: Add multi-config variantKyle Edwards2019-12-132-2/+3
| | | | | | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* | Merge topic 'cpack-use-CPACK_PACKAGE_HOMEPAGE_URL'Kyle Edwards2019-12-114-0/+51
|\ \ | |/ |/| | | | | | | | | 3476dbe6d7 CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URL Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4024
| * CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URLAlex Turbov2019-12-094-0/+51
| | | | | | | | | | | | | | | | | | | | | | 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
* | CPack: Remove CPACK_INSTALL_CMAKE_CONFIGURATIONSAlex Turbov2019-11-114-18/+0
|/ | | | | | | | | | | In commit da5ac4bb60 (cpack: Add `CPACK_INSTALL_CMAKE_CONFIGURATIONS` variable, 2019-07-10, v3.16.0-rc1~165^2) we added both the variable and support for `cpack -C` with multiple configurations. Drop the variable because the `package` target cannot ensure that all of the configurations are built. Keep the command-line interface so that it can be used manually in scripts. Fixes: #19918