summaryrefslogtreecommitdiffstats
path: root/Modules/Internal
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'compute-compiler-linker'Brad King2024-01-041-7/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * LinkerId: Record detection steps to configure logBrad King2024-01-031-0/+7
| |
| * LinkerId: Use empty string for unknown linker idBrad King2024-01-031-4/+0
| | | | | | | | | | | | | | 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.
| * LinkerId: Match Apple linker on all Apple platformsBrad King2024-01-031-1/+1
| | | | | | | | | | | | `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.
| * LinkerId: Fix detection of GNU linker id without parenthesis in version outputBrad King2024-01-031-2/+2
| |
* | CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file()Brad King2023-12-191-0/+8
| | | | | | | | | | | | | | Add a helper to select architecture-specific implementations of a package on an Apple-specific platform. Fixes: #25516
* | CMakePackageConfigHelpers: Clarify Apple platform selection template nameBrad King2023-12-181-0/+0
|/ | | | | | The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add generate_apple_platform_selection_file(), 2023-11-03) is specific to Apple platforms. Give it an Apple-specific name.
* CMakePackageConfigHelpers: Fix Apple platform selection for tvOSBrad King2023-12-151-2/+2
| | | | | Fix the tvOS SDK name in commit 37bc3400cd (CMakePackageConfigHelpers: Add generate_apple_platform_selection_file(), 2023-11-03).
* LinkerId: Identify AIX and SunOS system linkersBrad King2023-12-081-0/+9
| | | | Populate `CMAKE_<LANG>_COMPILER_LINKER_{ID,VERSION}` on these platforms.
* LinkerId: Try multiple flags to detect linker id and versionBrad King2023-12-081-42/+51
| | | | | In general there is no one flag on any platform that can identify every linker.
* LinkerId: Match linker id and version more robustlyBrad King2023-12-081-21/+15
| | | | Extract version number output only after explicitly matching it.
* CMakePackageConfigHelpers: Move platform selection template to Internal/Brad King2023-12-071-0/+24
| | | | | | The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add generate_apple_platform_selection_file(), 2023-11-03) is a private implementation detail. Move it to `Modules/Internal/`.
* Merge topic 'rpm-quoting'Brad King2023-11-301-5/+19
|\ | | | | | | | | | | | | | | | | 5123e9e160 ci: unmask RPM tests on Fedora 39 bf22ac5263 CPack/RPM: Quote paths in rpm spec only if they have whitespace 75ea6207b7 CPack/RPM: Factor out helper to quote paths in generated rpm spec Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9005
| * CPack/RPM: Quote paths in rpm spec only if they have whitespaceBrad King2023-11-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | RPM supports either whitespace with quoting or globbing without quoting. Prior to RPM 4.19 it accepted globbing in quotes, but it only globbed correctly without whitespace, where quoting was not necessary anyway. Starting in RPM 4.19, glob characters in quotes are considered literal. Fixes: #25421 Inspired-by: Ben Boeckel <ben.boeckel@kitware.com> See: https://github.com/rpm-software-management/rpm/commit/d44114f007f54f205ffa13d22724199fe50a137a
| * CPack/RPM: Factor out helper to quote paths in generated rpm specBrad King2023-11-291-5/+14
| |
* | Merge topic 'cpack-auto-suffixes'Brad King2023-11-282-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 53991e62da CPack/RPM: Append .rpm to CPACK_RPM_FILE_NAME if missing f2a6d423da CPack/DEB: Append .deb to CPACK_DEBIAN_FILE_NAME if missing 907d4db558 Help: Format allowed CPACK_{DEB,RPM}_FILE_NAME values as definition list Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8880
| * | CPack/RPM: Append .rpm to CPACK_RPM_FILE_NAME if missingAlex Neundorf2023-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we issued an error when the `.rpm` suffix is missing. Instead, append the suffix automatically. This matches the behavior of `CPACK_ARCHIVE_FILE_NAME`, to which the archive format suffix is automatically appended. With this change, developers can simply do set(CPACK_RPM_comp_FILE_NAME "${CPACK_ARCHIVE_comp_FILE_NAME}")
| * | CPack/DEB: Append .deb to CPACK_DEBIAN_FILE_NAME if missingAlex Neundorf2023-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Previously we issued an error when the `.deb` or `.ipk` suffix is missing. Instead, append the suffix `.deb` automatically. This matches the behavior of `CPACK_ARCHIVE_FILE_NAME`, to which the archive format suffix is automatically appended.
* | | Merge topic 'ci-fedora-39'Brad King2023-11-201-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 9283b20659 ci: Suppress CPack/RPM tests pending fix for Fedora 39 18145e8745 ci: Update FindMPI test environment for mpich on Fedora 39 a8be80ccf2 ci: Drop now-unnecessary Clang rules for CXXModules tests 99238b23e9 ci: use Fedora 39 images and environments 57eadec617 ci: update Linux image to Fedora 39 653262162c clang-tidy module: Update to build against LLVM/Clang 17 2cf9a65835 clang-tidy: ignore warnings new in version 17 ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8983
| * \ \ Merge branch 'backport-ci-fedora-39' into ci-fedora-39Brad King2023-11-171-1/+1
| |\ \ \ | | | |/ | | |/|
| | * | codespell: Fix typosBrad King2023-11-171-1/+1
| | | |
* | | | CPack/WiX: Make InstallScope configurableMax Gaukler2023-11-162-0/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope` when using the default WiX template. Set the default to the bug-free value `perMachine`. Fixes: #20962
* | | Merge branch 'backport-cuda-vs' into cuda-vsBrad King2023-11-011-0/+3
|\ \ \ | |/ /
| * | CMakeNVCCParseImplicitInfo: Recognize link.exe line in CUDA VS integrationBrad King2023-11-011-0/+3
| |/
* | Link Step: compute effective linker used by the compilerMarc Chevrier2023-10-241-0/+92
|/ | | | | | | | | | | | | | | Extract the effective linker during the computation of implicit artifacts delivered by the compiler to the linker. Define various variables describing the linker: * CMAKE_<LANG>_COMPILER_LINKER * CMAKE_<LANG>_COMPILER_LINKER_VERSION * CMAKE_<LANG>_COMPILER_LINKER_ID * CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT This is complementary to feature introduced by commit 96a953b1ed (Add options to specify linker tool, 2023-09-27). Fixes: #17596, #18209, #25344
* CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURESBrad King2023-09-211-0/+19
| | | | Prepare to use it for other languages.
* CUDA: Factor out helper for detecting native CUDA architecturesBrad King2023-09-211-0/+49
| | | | Prepare to use it for other languages.
* CUDA: Factor out helper to compute all CUDA architecturesBrad King2023-09-211-0/+88
| | | | Prepare to use it for other languages.
* CUDA: Factor out helper to find CUDA Toolkit for compilerBrad King2023-09-211-0/+173
| | | | Prepare to use it for other languages.
* CUDA: Factor out helper to filter implicit link librariesBrad King2023-09-211-0/+20
| | | | Prepare to use it for other languages.
* CUDA: Factor out helper to parse NVCC implicit compiler and linker flagsBrad King2023-09-212-0/+165
| | | | Prepare to use it for other languages.
* CPack/NSIS: Fix incorrect jump for standard userSprite2023-09-051-1/+1
| | | | | | | Revert an incorrect change from commit c4a0bcea77 (CPack: Fix NSIS handling of privileged users, 2012-02-01, v2.8.8~230^2). Fixes: #13939
* Modules/Internal/FeatureTesting: mark feature testing as a special testBen Boeckel2023-07-311-0/+1
|
* codespell: Fix typosBrad King2023-05-221-1/+1
|
* CPack: Add Inno Setup generatorJannik Alber2023-04-282-0/+122
|
* Merge topic 'revert-CheckCompilerFlag-clang-argument-unused'Brad King2023-03-142-3/+8
|\ | | | | | | | | | | | | | | | | 97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...' Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8322
| * CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'Brad King2023-03-132-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2). It broke existing projects that were silently tolerating unrelated unused arguments in their checks for C and CXX. For example, using `CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be used when driving the linker as well, and Clang warns they are unused in that case. Add a test case covering the now-restored behavior. Fixes: #24591
* | Modules:Check*: refactor: use block(SCOPE_FOR POLICIES)scivision2023-03-085-10/+11
|/
* CheckCompilerFlag: Match the Clang "argument unused" output for all languagesKOLANICH2023-01-242-8/+3
| | | | | | Improve detection of missing compiler flags: move "argument unused during compilation: .*" pattern from language-specific branches into the common list.
* Modules: Record system inspection steps in the configure logBrad King2023-01-181-2/+2
| | | | | | | | Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging with calls to `message(CONFIGURE_LOG)` to record the steps in the `CMakeConfigureLog.yaml` configure log instead. Issue: #23200
* Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.logBrad King2023-01-183-33/+1
| | | | | | | | | | `try_compile` and `try_run` now automatically log checks using them to `CMakeConfigureLog.yaml`. Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to replace the description previously written to the old logs. Issue: #23200
* CompileFeatures: Warn explicitly when feature detection binary is not foundBrad King2023-01-181-4/+7
| | | | This step is not normally expected to fail, so warn instead of logging it.
* Source: Fix a few typosVitaly Stakhovsky2023-01-171-2/+2
|
* CheckCompilerFlag: Add Swift SupportEvan Wilde2022-11-041-0/+2
| | | | | Plumb through Swift `check_compiler_flag` support. Add tests to check that valid flags work and invalid flags don't.
* CheckSourceCompiles: For Swift executable, name source 'main.swift'Evan Wilde2022-10-241-2/+6
| | | | | | | | | | | | | | | | Xcode uses its own heuristics to determine whether or not to accept top-level code in a source file while Ninja uses the swift driver heuristics. With the Swift driver, if the module contains a single file, that file will be parsed as a top-level code context. With Xcode, the single file will only be parsed as top-level code if the name of that file is 'main.swift'. To ensure more consistent behavior between the two generators, if we're building Swift and the try-compile target type is executable or undefined, we name the file `main.swift` to ensure that both will handle the single file as top-level code.
* CheckSourceCompiles: Add support for SwiftEvan Wilde2022-10-241-0/+3
| | | | | Plumb through swift `check_source_compiles` support. Add tests to check that valid swift sources compile and invalid sources don't.
* Merge topic 'cpack-nsis-uninstaller'Brad King2022-10-111-5/+14
|\ | | | | | | | | | | | | 8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7774
| * CPack/NSIS: Fix installer not waiting for uninstaller to finishMika Fischer2022-10-101-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit b795c96727 (CPack/NSIS: Fix uninstall command when run from installer, 2022-03-21, v3.23.0-rc5~9^2~1) we incorrectly removed the `_?` parameter when calling the uninstaller during installation. This parameter is however essential for ExecWait to actually wait for the uninstaller to finish. Without it, the uninstaller is started in the background and installer and uninstaller run at the same time. See https://nsis.sourceforge.io/Docs/Chapter3.html#installerusageuninstaller Add back the `_?` parameter to fix this regression. Use another approach to solve the problem motivating the original change. Fixes: #24041
* | Modules: Use new SOURCES_FROM_* try_compile (1/2)Matthew Woehlke2022-09-273-10/+9
| | | | | | | | | | | | | | | | | | | | | | Modify some modules that ship with CMake to use the new SOURCES_FROM_* arguments to try_compile / try_run as added by commits cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and 611d801790 (try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers users which previously either used an existing file (but sometimes needed to rename it), or which wrote out their source in entirety. It does NOT cover users that actually need configure_file functionality, as those will be more involved to update and will thus be tackled in part 2.
* | Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-143-5/+3
| | | | | | | | | | | | | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.