summaryrefslogtreecommitdiffstats
path: root/Modules/Internal
Commit message (Collapse)AuthorAgeFilesLines
* CPack: Remove undocumented deprecated OSXX11 generatorBrad King2021-11-052-0/+0
| | | | | | | | This CPack generator was never documented, and has been deprecated since commit 2ed00e8ef8 (CPack: Deprecate OSXX11 generator, 2020-01-31, v3.17.0-rc1~45^2). Issue: #20235
* CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecturemakise-homura2021-10-151-0/+8
| | | | | | | | | | | "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.
* CPack/NSIS: Fix uninstall on Windows using "Apps & Features"Andras Lasso2021-09-141-1/+1
| | | | | | | | According to NSIS documentation [1], uninstaller executable path in UninstallString must always be quoted. Quote the uninstall executable in `NSIS.template.in` so that it works when the path has spaces. [1] https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
* Merge topic 'host-distro-info'Brad King2021-08-242-0/+79
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b9698f89df cmake_host_system_information: Make it available for all systems 5469c71a82 Refactor: Simplify `GetValue()` function calls 6c92f80f2e cmake_host_system_information: Also set `USED_FALLBACK_SCRIPT` efe139d1b8 cmake_host_system_information: Can run fallback scripts 1e65e4a6e5 cmake_host_system_information: Can read `/etc/os-release` file e808cbb1dd Testing: Convert `cmake_host_system_information` tests into `RunCMake` 9e831284e5 Documentation: Use definition list instead of tables 346f3de005 Refactor: Deduplicate code for `VS_nn_DIR` keys processing ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6410
| * cmake_host_system_information: Can run fallback scriptsAlex Turbov2021-08-202-0/+79
| |
* | Merge topic 'nsis_ignore_license_page'Brad King2021-08-031-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 795e406e3b CPack/NSIS: Add option to not display license page Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6422
| * | CPack/NSIS: Add option to not display license pageJohnny Jazeix2021-08-011-1/+1
| |/ | | | | | | Fixes: #22215
* | Merge topic 'cpack-rpm-pre-semicolon'Brad King2021-08-031-3/+1
|\ \ | |/ |/| | | | | | | | | | | 3cdf23985f CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6415
| * CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scriptsArtur Samarin2021-08-021-3/+1
| | | | | | | | | | | | | | This was accidentally added by commit 34c8a23044 (CPackRPM: add scriplets tags only if scripts exist, 2021-04-01, v3.21.0-rc1~387^2). Fixes: #22501
* | Merge topic 'cpack-deb-lib-multiarch'Brad King2021-07-131-2/+4
|\ \ | | | | | | | | | | | | | | | | | | 68b961d361 CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6341
| * | CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirsAlex Turbov2021-07-121-2/+4
| | | | | | | | | | | | Fixes: #22411
* | | Merge topic 'cpack-deb-post-ops'Brad King2021-07-131-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 805fa791d1 CPack/DEB: Avoid overriding user-provided `postinst` and `postrm` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6335
| * | CPack/DEB: Avoid overriding user-provided `postinst` and `postrm`Alex Turbov2021-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a user provides `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA` or `CPACK_DEBIAN_<comp>_PACKAGE_CONTROL_EXTRA` variables in `CMakeLists.txt` and the package contains dynamic libraries, the `CPackDeb.cmake` sets `CPACK_ADD_LDCONFIG_CALL` to `1`. Later it analyzes if defaulted `postinst`/`postrm` should be generated trying to check if the user provides any in `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA` variable. However, the `foreach` loop uses the invalid variable `PACKAGE_CONTROL_EXTRA` instead, so these files gonna be overridden. Fix the variable name. Fixes: #22410
| * | Merge topic 'check_cxx_compiler_flag_no_normal_variable' into release-3.21Brad King2021-07-081-1/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6318
* | | | CPack/RPM: Add option to set %global __requires_exclude_fromLisa Welsch2021-07-091-0/+12
| |_|/ |/| |
* | | Merge topic 'cpack-nsis_update-languange-list'Brad King2021-07-081-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 9ce235fe5d CPack/NSIS: Update language list in template Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6310
| * | | CPack/NSIS: Update language list in templateMarc Ruiz2021-07-071-0/+13
| |/ / | | | | | | | | | Fixes: #22382
* | | Merge topic 'check_cxx_compiler_flag_no_normal_variable'Brad King2021-07-081-1/+0
|\ \ \ | |/ / |/| / | |/ | | | | | | 018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6318
| * Check*CompilerFlag: Do not set result as a normal variable tooRobert Maynard2021-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | This was previously fixed by commit d46590910c (Check*CompilerFlag: Do not set result as a normal variable too, 2020-09-21, v3.18.3~1^2^2), but was regressed by refactoring in commit 90dead024c (CheckCompilerFlag: unified way to check compiler flags per language, 2020-09-25, v3.19.0-rc1~88^2) due to the changes being developed concurrently. Fix it again, and add a test case. Fixes: #21207
| * Merge topic 'correct_check_compiler_flag_regression' into release-3.19Brad King2020-11-301-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | 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
* | | CPack/RPM: Fix weak dep supportAlex Sweet2021-06-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | CheckCompilerFlag: Handle -Werror= for GCC 11Marc Aldorasi2021-06-171-2/+4
| | |
* | | Merge topic 'add_hip_language'Brad King2021-06-094-0/+23
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | HIP: Add HIP to all the Check* modulesRobert Maynard2021-06-073-0/+9
| | | |
| * | | HIP: Add language to CMakeRobert Maynard2021-06-071-0/+14
| | | |
* | | | CPackDeb: output the error message when no description can be madeBen Boeckel2021-06-071-1/+1
|/ / / | | | | | | | | | The `message` command does not support automatic dereferencing.
* | | CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exeMarkus Israelsson2021-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | CPackRPM: add scriplets tags only if scripts existDomen Vrankar2021-04-011-36/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-281-2/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | CPack/NSIS: Add option for setting branding textJohnny Jazeix2021-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | See https://nsis.sourceforge.io/Reference/BrandingText for more information. Fixes: #21479
* | | CPackDeb: dpkg-shlibdeps now supports searching for private shared libsDeniz Bahadir2021-01-221-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | CPack/NuGet: Fix nuspec file generation for UNIX-style OSiorikyu2020-12-221-1/+1
| | | | | | | | | | | | Use forward slashes, which should work on both UNIX and Windows.
* | | Merge topic 'correct_check_compiler_flag_regression'Brad King2020-11-301-3/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 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
| * | Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}FlagRobert Maynard2020-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'check-lang-conditions'Brad King2020-11-303-20/+20
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | 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
| * | Check*: Tolerate variables set with names of languagesBrad King2020-11-253-20/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | CPack/DEB: Do not crash when asked for debug symbols when there are noneAndrew Fuller2020-11-161-0/+4
| | | | | | | | Fixes: #21356
* | Merge topic 'cpack-nuget'Brad King2020-11-062-5/+78
|\ \ | | | | | | | | | | | | | | | | | | 41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5415
| * | CPack/NuGet: Add settings for the license, icon, and languageBob Apthorpe2020-11-052-5/+78
| | | | | | | | | | | | | | | | | | Also update the XML Schema. Fixes: #21348
* | | Merge topic 'CheckSourceRuns-compatibility'Brad King2020-10-301-1/+6
|\ \ \ | | |/ | |/| | | | | | | | | | | | | a524bf3aa7 CheckSourceRuns: do not fail on unrecognized arguments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5426
| * | CheckSourceRuns: do not fail on unrecognized argumentsBen Boeckel2020-10-281-1/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'check-module-name-conflicts'Brad King2020-10-273-0/+343
|\ \ \ | |/ / | | / | |/ |/| | | | | d192918586 Modules: Do not implicitly add new functions via old Check Modules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5424
| * Modules: Do not implicitly add new functions via old Check ModulesRobert Maynard2020-10-263-0/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | CPack/NSIS: Template file in UTF-8 BOM to support UnicodeJohnny Jazeix2020-10-191-1/+1
|/ | | | Fixes: #21318
* CPack/WiX: Add support for custom XML namespacesFritz Elfert2020-08-181-1/+1
| | | | | | Add a `CPACK_WIX_CUSTOM_XMLNS` option to specify these. Fixes: #21098
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,\ " ```
* FindCUDAToolkit: Re-unify with Internal/CUDAToolkitRaul Tambre2020-06-121-227/+0
| | | | | | | | | | | | | | | | 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.
* Merge topic 'fix-cpack-deb-generating-empty-paragraph'Brad King2020-05-281-0/+10
|\ | | | | | | | | | | | | 6ba842163c CPack-deb: don't add a line with a dot to pkg desc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4806