summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
| * 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
| | |
* | | 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".
* | | CMake 3.21.4v3.21.4Brad King2021-10-271-1/+1
| | |
* | | Merge branch 'fix-ifdef-windows' into release-3.21Brad King2021-10-154-4/+4
|\ \ \ | | |/ | |/| | | | Merge-request: !6631
| * | Source: Fix typo in _WIN32 preprocessor checksBrad King2021-10-154-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CMake's default compiler flags with MSVC include `-DWIN32` for historical reasons, a few preprocessor conditions were accidentally checking for `WIN32` instead of `_WIN32`. The corresponding blocks were left out when compiling official binaries for `cmake.org` because we hard-code compiler flags without `-DWIN32`. Fixes: #22764
| * | CMake 3.19.8v3.19.8Brad King2021-04-061-1/+1
| | |
* | | bootstrap: Enable cmake_language command to support cmake-gui with Qt 6.2Brad King2021-10-051-2/+2
| | | | | | | | | | | | Fixes: #22721
* | | cmQtAutoGenInitializer: support IMPLIB-only imported targetsBen Boeckel2021-09-241-1/+10
| | | | | | | | | | | | | | | | | | | | | Instead of using the target name directly (which ends up in the `Ninja` generators querying for the `LOCATION` parameter), wrap up the target name in a `$<TARGET_LINKER_FILE:>` to avoid the query for the unset property.
* | | CMake 3.21.3v3.21.3Brad King2021-09-201-1/+1
| | |
* | | VS: Fix managed C++ project generation for VS 2022Brad King2021-09-151-0/+4
| | | | | | | | | | | | | | | | | | | | | VS 2022 expects managed `.vcxproj` files to have a `ManagedAssembly` element. Fixes: #22583
* | | Merge topic 'update-kwsys' into release-3.21Brad King2021-09-091-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 115152ce10 KWSys: SystemTools: Ensure Windows Vista APIs are available before using them Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6500
| * | | KWSys: SystemTools: Ensure Windows Vista APIs are available before using themulatekh2021-09-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Backport KWSys commit `4ef5b1063` (SystemTools: Ensure Windows Vista APIs are available before using them, 2021-08-30) to the CMake 3.21 release branch.
* | | | Ninja: fix ARMClang paths for WindowsMartin Kojtal2021-09-021-0/+2
|/ / / | | | | | | | | | | | | | | | | | | We need to escape paths for ARMClang on Windows, see the referenced issue for more details. Fixes: #21093
* | | CMake 3.21.2v3.21.2Brad King2021-08-251-1/+1
| | |
* | | Merge topic 'vs-toolset-version' into release-3.21Brad King2021-08-241-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 25c5ebba7e VS: Add special case for '-T version=14.29.16.11' under VS 16.11 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6469
| * | | VS: Add special case for '-T version=14.29.16.11' under VS 16.11Brad King2021-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the table of special cases from commit 58a50a3a0a (VS: Fix '-T version=14.28' under VS 16.9, 2021-03-11, v3.19.7~1^2~1) and updated by commit a60141feaa (VS: Add special case for '-T version=14.29.16.10' under VS 16.10, 2021-05-27, v3.20.4~11^2). Add a special case for the name VS 17 will use for VS 16.11's default toolset, so that it can be used with VS 16.11 too. Issue: #21922
* | | | AUTOUIC: Revert "Fix generating of dependency rules for UI header files"Brad King2021-08-1910-119/+81
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit e5ec0e52f4 (AUTOUIC: Fix generating of dependency rules for UI header files, 2021-07-22, v3.21.1~8^2) because it caused regressions. For example, changing one C++ source can now cause many others to rebuild. Revert the change pending further investigation. Fixes: #22531 Issue: #16776
* | | Merge topic 'ninja-lwyu-ar' into release-3.21Brad King2021-08-061-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 93eb4a7bd1 Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6418
| * | | Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static librariesĐoàn Trần Công Danh2021-08-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d7159f9591, (Ninja: Fix LINK_WHAT_YOU_USE link flag placement, 2021-06-24), we fixed usage of -Wl,--no-as-needed to override -Wl,--as-needed from LDFLAGS. However, that change also passes -Wl,--no-as-needed to `ar`, which is incorrect flag for `ar`. Let's check the target type before passing down the flags. Fixes: #22487
* | | | Merge topic 'CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER' into ↵Brad King2021-08-031-2/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | release-3.21 213fec4908 add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILER Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6421
| * | | | add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILERMarc Chevrier2021-08-011-2/+20
| | | | | | | | | | | | | | | | | | | | Fixes: #22486
* | | | | VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE librariesBrad King2021-07-291-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the VS generator may process INTERFACE libraries. Avoid code paths in the generator that process include directories because they should not be used by INTERFACE libraries since they do not compile anything. Fixes: #22494
* | | | Merge topic 'cuda_separable_clang_make' into release-3.21Brad King2021-07-292-24/+28
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3975678fcc CUDA/Clang: Simplify --register-link-binaries logic 0b1cea66cd CUDA/Clang: Fix separable compilation in non-root directories with Makefiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6400
| * | | | CUDA/Clang: Simplify --register-link-binaries logicroot2021-07-292-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the logic for appending cubin afterwards, so the check can simply be empty(). With the Makefile generator the option is now at the front instead of being intermixed with the actual bins.
| * | | | CUDA/Clang: Fix separable compilation in non-root directories with Makefilesroot2021-07-291-10/+14
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems the relative paths were wrong basically all around such that only compiling files in the top-level directory would work. I've modified CudaOnly.SeparateCompilation to cover this. Fixes #22482.
* | | | Merge topic 'ctest-test-changing-labels' into release-3.21Brad King2021-07-291-4/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 26170ea306 CTest: Reset multi-options to persistent multi-options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6403
| * | | | CTest: Reset multi-options to persistent multi-optionsKyle Edwards2021-07-281-4/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44ad3f0b added multi-options to CTest, but didn't reset them, causing ctest_test() to fail if it was run multiple times with different label arguments. Reset the multi-options. Fixes: #22485
* | | | CMakePresets: Check presets with their own file versionKyle Edwards2021-07-271-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 06e6981 added support for optional binaryDir and generator, but use the dependent preset's file version instead of the current preset's file version. Check presets with their own file version instead of their dependent's file version. Fixes: #22428
* | | CMake 3.21.1v3.21.1Brad King2021-07-271-1/+1
| | |
* | | Merge branch 'upstream-KWSys' into update-kwsysBrad King2021-07-262-4/+6
| | | | | | | | | | | | | | | | | | # By KWSys Upstream * upstream-KWSys: KWSys 2021-07-26 (d5fd6ca2)
* | | Merge topic 'autouic-header-depends' into release-3.21Brad King2021-07-2610-81/+119
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e5ec0e52f4 AUTOUIC: Fix generating of dependency rules for UI header files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6380
| * | | AUTOUIC: Fix generating of dependency rules for UI header filesAlexey Edelev2021-07-2310-81/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We could not rely on .ui files when generating the ninja rules for the generated UI header files. .ui files might be added to the target sources but never processed by AUTOUIC afterward, since UI header files are never included in a source code. Instead of adding dependency rules based on the .ui files, this approach scans non-generated source files for includes of the UI header files, as AUTOUIC does. This gives the consistent set of UI header files at configure time, that could be used to generate byproducts rules for the AUTOUIC. Also, the path to the generated UI header file depends not on the .ui file location but on the include line is used in source files. Fixes: #16776
* | | | Merge topic 'autogen-deps' into release-3.21Brad King2021-07-261-5/+23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4bda03370d AutoGen: Fix needless compilation of mocs_compilation.cpp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6381
| * | | | AutoGen: Fix needless compilation of mocs_compilation.cppJoerg Bornemann2021-07-231-5/+23
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For an AUTOMOC'ed target foo, when depfiles are used, there are the following dependencies: foo_autogen -> foo_autogen/timestamp foo_autogen/mocs_compilation.cpp -> foo_autogen/timestamp The first is used to trigger AUTOGEN. The second erroneously triggers a recompilation of mocs_compilation.cpp when any source file of target foo is touched. Remove the latter dependency and replace it with an order-only dependency from foo_autogen/mocs_compilation.cpp to foo_autogen_timestamp_deps. That is achieved by making mocs_compilation.cpp or its per-configuration variants byproduct(s) of the timestamp file. Fixes: #22338
* | | | Merge topic 'nmc-target-objects' into release-3.21Brad King2021-07-231-4/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | cb777dd81e Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configs 83c8272280 cmGeneratorExpressionNode: Factor out local variable for global generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6371
| * | | Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configsBrad King2021-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2ae72ef74b (Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES, 2021-05-26, v3.21.0-rc1~126^2) the TARGET_OBJECTS genex, when referenced for linking, is now evaluated with EvaluateForBuildsystem enabled. This causes the object file paths to be computed with a buildsystem-specific placeholder for the configuration. This is normally fine because the placeholder will be evaluated by the native buildsystem tool using the proper configuration. However, the Ninja Multi-Config generator's `${CONFIGURATION}` placeholder may not have the correct value for cross-config object files. Switch back to using the per-config location of each object file for this generator. Fixes: #22436
| * | | cmGeneratorExpressionNode: Factor out local variable for global generatorBrad King2021-07-201-3/+4
| | | |
* | | | Merge topic 'message-color' into release-3.21Brad King2021-07-211-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c7a8c9c811 cmMessenger: Revert to non-color messages on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6369
| * | | | cmMessenger: Revert to non-color messages on WindowsBrad King2021-07-201-0/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by type, 2021-05-18, v3.21.0-rc1~146^2) the message output no longer goes through our custom streambuf on Windows that converts output encoding. This can cause messages to be printed with the wrong encoding in a Windows Console. It also causes messages to have a mix of LF and CRLF newlines because `stderr` converts LF to CRLF but our custom streambuf does not. Revert to using just `cerr` for messages on Windows. Another approach will be needed to achieve color output on Windows later. Fixes: #22444
* | | | Merge topic 'toolchain-CMP0126' into release-3.21Brad King2021-07-211-0/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 144be54dd3 try_compile: Propagate CMP0126 to the generated test project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6366
| * | | try_compile: Propagate CMP0126 to the generated test projectBrad King2021-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | Set policy CMP0126 to the value used in the calling project. It may affect toolchain file behavior.
* | | | AUTOUIC: Fix cyclic dependency between generated UI headers and timestampAlexey Edelev2021-07-191-6/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the generated UI headers are created by UIC they also are involved into processing in next run on ninja. Autogen adds `ui_*.h` files to the deps file `ui_*.h` and this cause timestamp start depend on `ui_*.h`. Meanwhile `ui_*.h` depend on timestamp because of the explicit rules added by commit 1265c65b33 (AUTOUIC: Collect ui header files for Ninja generator, 2021-02-18, v3.21.0-rc1~600^2). Avoid adding `ui_*.h` to deps file at second ninja run. Fixes: #16776
* | | Merge topic 'cmake-presets-no-binary-dir-no-s' into release-3.21Brad King2021-07-191-4/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | aa874dc609 CMakePresets.json: Fix expansion issue with empty binaryDir Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6358
| * | | CMakePresets.json: Fix expansion issue with empty binaryDirKyle Edwards2021-07-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resolving binaryDir into a full path from a relative path, we forgot to check if binaryDir is altogether empty, causing empty binaryDir's to resolve to the source directory. Fix this. Fixes: #22434