summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'vs2022-only' into release-3.22Brad King2022-05-191-0/+1
|\ | | | | | | Merge-request: !7282
| * file(GET_RUNTIME_DEPENDENCIES): Support VS 2022 without VS 2019Brad King2022-05-191-0/+1
| | | | | | | | Find MSVC tools in VS 2022 installation.
* | CMake 3.22.4v3.22.4Brad King2022-04-121-1/+1
| |
* | PCH: Fix Xcode non-pch language exclusionCristian Adam2022-04-111-4/+6
| | | | | | | | | | | | | | Fix a regression caused by commit bbcdac4e5d (PCH: Fix all-language precompile header support in Xcode, 2021-08-07, v3.22.0-rc1~140^2). Fixes: #23138
* | Merge branch 'aix-exe-exports' into release-3.22Brad King2022-03-261-3/+3
|\ \ | |/ | | | | Merge-request: !7120
| * AIX: Fix executable ENABLE_EXPORTS in Makefile generatorsBrad King2022-03-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit afcd9fe669 (AIX: Add an option to disable automatic exports from shared libraries, 2020-01-30, v3.17.0-rc1~47^2) the population of the `<AIX_EXPORTS>` rule variable placeholder was accidentally added to the device linking rule rather than the main linking rule. This caused our `ExportImportList` script on AIX, when called for executables with `ENABLE_EXPORTS` set, to be given an `AIX_EXPORTS` file name that does not exist, leading to a warning from the `dump` tool. Move the population of the `<AIX_EXPORTS>` placeholder in the Makefile generators to the main link rule. Issue: #20290
| * CMake 3.21.6v3.21.6Brad King2022-03-041-1/+1
| |
| * CMake 3.21.5v3.21.5Brad King2022-02-011-1/+1
| |
* | CMake 3.22.3v3.22.3Brad King2022-03-041-1/+1
| |
* | while: Restore tolerance of condition errorAlex Turbov2022-03-031-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the code set(paren "(") while(${paren}) endwhile() However, rejecting it breaks compatibility with projects that used such code accidentally. In CMake 3.21 and below, any error in the condition was ignored because the `false` result exited the loop first. Restore tolerance of the error for now. A policy will be needed to make it an error later. Note that the same condition with `if` was always correctly rejected. Fixes: #22524 Issue: #23296 Co-authored-by: Brad King <brad.king@kitware.com>
* | install(TARGETS): Restore per-export INCLUDES DESTINATIONEugene Shalygin2022-02-096-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
* | Merge topic 'message-flush' into release-3.22Brad King2022-01-281-2/+2
|\ \ | |/ | | | | | | | | | | 634587e322 message: Restore explicit flushing of messages on stderr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6913
| * message: Restore explicit flushing of messages on stderrBrad King2022-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the `cmake` command-line tool, the `message()` command with no message mode argument prints the message stderr using the C++ `cerr` stream. Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by type, 2021-05-18, v3.21.0-rc1~146^2) and an update by commit c7a8c9c811 (cmMessenger: Revert to non-color messages on Windows, 2021-07-20, v3.21.1~15^2), we print the newline at the end of the message using just `\n`. We've now observed some cases of output on stdout and stderr getting jumbled when the two go to the same file descriptor. Previously the newline was printed with `endl`, which implicitly flushes. Flush explicitly to restore that behavior. Fixes: #23155
* | Merge topic 'nmake-rsp-encoding' into release-3.22Brad King2022-01-271-2/+15
|\ \ | |/ | | | | | | | | | | | | | | d5ee6d50ee NMake: Use UTF-8 BOM in response files only with MSVC tooling cab631c2e2 NMake: Document response file encoding heuristic in a comment Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6905
| * NMake: Use UTF-8 BOM in response files only with MSVC toolingBrad King2022-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | Since commit f3f57cc4ed (NMake: Use UTF-8 with BOM if supported by nmake, 2021-04-22, v3.21.0-rc1~217^2), we add a BOM to response files to tell MSVC tooling that they are encoded as UTF-8. However, the "NMake Makefiles" generator may also be used with non-MSVC toolchains that do not understand the BOM. Update the response file encoding selection heuristic to add the BOM only with MSVC tooling. Fixes: #23143
| * NMake: Document response file encoding heuristic in a commentBrad King2022-01-261-2/+10
| | | | | | | | | | | | | | | | Since commit f3f57cc4ed (NMake: Use UTF-8 with BOM if supported by nmake, 2021-04-22, v3.21.0-rc1~217^2) the encoding of response files is selected based on the makefile encoding. In principle these may be orthogonal, but in practice it is a useful heuristic. Call out this heuristic in a comment, and leave a FIXME to do something better.
| * Merge branch 'IntelLLVM-Fortran-copy-mod' into release-3.21Brad King2021-11-171-1/+1
| |\ | | | | | | | | | Merge-request: !6740
* | | CMake 3.22.2v3.22.2Brad King2022-01-251-1/+1
| | |
* | | CMP0128: Add flag in OLD mode even when standard matches the defaultRaul Tambre2022-01-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4a0485be (cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic, 2021-04-29) unintentionally changed the behavior by modifying the code to match a pre-existing comment. The resulting behavior change however matches the intentions of CMP0128, so we simply need to guard it. Fixes #23122.
* | | file: Restore error capture in undocumented READ_ELF modeBrad King2022-01-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Revise the error message added by commit 115ff6a347 (cmELF: Include the ELF parsing code unconditionally, 2021-06-17, v3.22.0-rc1~557^2) to honor the `CAPTURE_ERROR` option. This is needed by the call site in `BundleUtilities` to suppress errors on non-ELF files. Fixes: #23074
* | | CMake 3.22.1v3.22.1Brad King2021-12-071-1/+1
| | |
* | | HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIPBrad King2021-12-071-1/+1
| | | | | | | | | | | | Fixes: #22986
* | | VS: Revert "Add missing label in C# project-build events"Brad King2021-12-024-26/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit b284a21fee (VS: Add missing label in C# project-build events, 2021-09-03, v3.22.0-rc1~156^2). The change broke cases using multiple successful custom commands. Revert it pending further investigation into the interaction of the generated script code with `Microsoft.Common.CurrentVersion.targets`, and whether this is needed for all managed projects or just C# projects. Also add a test covering the case that was broken. Fixes: #22964 Issue: #21440
* | | file(RPATH): Restore tolerance of unknown formats if new RPATH is emptyBrad King2021-12-011-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2e1149874d (cmSystemTools: Support multiple binary formats, 2021-06-14, v3.22.0-rc1~575^2) the `file(RPATH_...)` operations fail on files that are not ELF or XCOFF format. Previously the RPATH operations tolerated files of unknown format if the goal was to produce a file with an empty RPATH. Restore this tolerance in order to support setting an empty RPATH on GNU ld scripts. Fixes: #22963
* | | cmSystemTools: Remove unnecessary mark-as-used casts to voidBrad King2021-12-011-2/+0
| | | | | | | | | | | | The `CheckRPath` arguments are always used now.
* | | mingw: fix calling convention for strftime()Christoph Reiter2021-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `strftime` uses `__cdecl` and not `__stdcall`. This was exposed by refactoring in commit 26c9fbab46 (MINGW-w64: Fix string(TIMESTAMP) build on 32bits, 2021-11-16, v3.22.0~1^2). This fixes a crash creating a timestamp with clang+mingw-w64 targeting x86. Fixes: #22939
* | | try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env varsBrad King2021-11-222-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since: * commit e216b9bbd3 (cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable, 2021-06-29, v3.22.0-rc1~503^2~1) * commit ef56eefc9b (cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable, 2021-06-29, v3.22.0-rc1~503^2) the environment variables are supposed to provide defaults for settings the user otherwise can control via cache entries. However, they accidentally affect `try_compile` projects too, which are supposed to be programmatically controlled. Fixes: #22935
* | | CMake 3.22.0v3.22.0Brad King2021-11-181-1/+1
| | |
* | | MINGW-w64: Fix string(TIMESTAMP) build on 32bits.Antons Jeļkins2021-11-181-3/+9
| | | | | | | | | | | | | | | | | | | | | Rephrase the string(TIMESTAMP) implementation not to cause gcc-11 ICE on MSYS2/mingw32. Fixes: #22916
* | | cmTimestamp: Declare component buffer before MinGW-specific codeAntons Jeļkins2021-11-181-2/+2
| | |
* | | Merge topic 'IntelLLVM-Fortran-copy-mod' into release-3.22Brad King2021-11-181-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 209b896f2c IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generators Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6740
| * | IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generatorsBrad King2021-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Makefile generators use an internal `cmake -E cmake_copy_f90_mod` tool to avoid rebuilding module consumers when the `.mod` content changes only in a trivial way (e.g. the time it was built). This is done with logic specific to each vendor's module file format. Enable the "Intel" format support when using the IntelLLVM compiler (ifx) too. Issue: #22922
| * | Merge branch 'fix-ifdef-windows' into release-3.20Brad King2021-10-154-4/+4
| |\ \ | | | | | | | | | | | | Merge-request: !6631
| * | | CMake 3.20.6v3.20.6Brad King2021-09-201-1/+1
| | | |
* | | | CMake 3.22.0-rc3v3.22.0-rc3Brad King2021-11-121-1/+1
| | | |
* | | | CMP0128: Enable/disable extensions if standard same as defaultRaul Tambre2021-11-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was intended to be part of the initial MR (!6177), but accidentally went missing when debugging nightly failures on less common systems. Noticed during !6711 review as the comment about this behaviour didn't match the code. Documentation for CMP0128 is updated to remove a false case and note the two cases related to this. Fixes #22224.
* | | | Merge topic 'nmc-reuse-from' into release-3.22Brad King2021-11-091-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 244550997f PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6713
| * | | | PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVCCristian Adam2021-11-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The copy_idb_pdb.cmake script would be executed for every configuration for all configurations. Debug would still want to get the RelWithDebInfo files, and the other way around.
* | | | | Merge topic 'msvc-pch-reuse-config' into release-3.22Brad King2021-11-091-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95fa27d94d PCH: Fix REUSE_FROM when Debug and RelWithDebInfo configs differ Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6712
| * | | | | PCH: Fix REUSE_FROM when Debug and RelWithDebInfo configs differCristian Adam2021-11-081-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the Debug configuration contains `/ZI` but the RelWithDebInfo doesn't then the copy_pdb_idb.cmake script will cause problems due to the fact that it was common for both configurations but they are incompatible with each other.
* | | | | Merge topic 'vs-framework-version' into release-3.22Brad King2021-11-085-39/+124
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022 f97f8537f3 VS: Model a default target framework e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection 78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6699
| * | | | | VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022Brad King2021-11-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSBuild defaults to v4.0 but VS 2022 does not install it anymore. Explicitly specify a newer framework version by default. Use a version that VS 2022 installs without selecting a separate component. Fixes: #22835
| * | | | | VS: Model a default target frameworkBrad King2021-11-064-10/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fields to the VS generator to select a target framework. Migrate the existing default for VS 12 .NET CF for Windows CE. Report the values in `CMAKE_VS_*` variables and use them for the CSharp compiler id project too. Issue: #22849
| * | | | | cmVisualStudio10TargetGenerator: Refactor target framework selectionBrad King2021-11-061-35/+53
| | | | | | | | | | | | | | | | | | | | | | | | Split the selection from the generation of the resulting element(s).
| * | | | | cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatformBrad King2021-11-031-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-organize the method to make room for additional `CMAKE_GENERATOR_PLATFORM` processing.
* | | | | | Ninja Multi-Config: Fix custom command target dependencies in cross-configsBrad King2021-11-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator expressions in a non-cross custom command's `COMMAND` arguments are evaluated in the command config. Target-level dependencies implied by `TARGET_FILE` must therefore be cross dependencies. This is important to generate proper target-level dependencies on the cross-config build statements for the target to which the custom command is attached. Fixes: #22855
* | | | | | Ninja Multi-Config: Fix internal cross-config target dependency orderingBrad King2021-11-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 7abc3d61ac (Ninja Multi-Config: Fix issue with framework dependencies and Autogen, 2020-02-13, v3.17.0-rc2~18^2) the `cmLinkItem` comparison operator was updated to order identical strings by the cross-config boolean. We need to order identical targets that way too in order to represent both a cross and non-cross dependency on the same target. Issue: #22855
* | | | | | Ninja Multi-Config: Fix cross-config custom command dependency tracingBrad King2021-11-044-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Process `CMAKE_CROSS_CONFIGS` and friends to properly configure the generator for cross-config behavior before custom command dependency tracing.
* | | | | | Merge topic 'msvc-cxx-modules-scanDependencies' into release-3.22Brad King2021-11-041-1/+1
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ed1d7bee6 cmScanDepFormat: Accept P1689r4 files with version 1 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6696
| * | | | | cmScanDepFormat: Accept P1689r4 files with version 1Brad King2021-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VS 2022's `cl` 19.30 has a `-scanDependencies` option that produces the P1689r4 format. It reports the "version" field with value "1".