summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CMake 3.17.5v3.17.5Brad King2020-09-151-1/+1
|
* Merge branch 'backport-3.17-automoc-path-prefix-off' into release-3.17Brad King2020-09-151-0/+9
|\
| * Help: Add 3.17.5 release note about AUTOMOC_PATH_PREFIX default changeJoerg Bornemann2020-09-151-0/+9
| |
| * Merge branch 'backport-3.16-automoc-path-prefix-off'Brad King2020-09-151-5/+11
| |\
* | \ Merge branch 'release-3.16' into release-3.17Brad King2020-09-151-5/+11
|\ \ \ | |/ / |/| |
| * | CMake 3.16.9v3.16.9Brad King2020-09-151-1/+1
| | |
| * | Merge branch 'backport-3.16-automoc-path-prefix-off' into release-3.16Brad King2020-09-151-5/+11
| |\ \ | | |/
| | * Help: Add 3.16.9 release note about AUTOMOC_PATH_PREFIX default changeJoerg Bornemann2020-09-151-5/+11
| | |
| * | Merge branch 'backport-3.16-automoc-path-prefix-off' into release-3.16Brad King2020-08-104-5/+7
| |\ \ | | |/ | | | | | | Merge-request: !5105
| * | Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.16Brad King2020-08-071-0/+5
| |\ \ | | | | | | | | | | | | Merge-request: !5108
* | \ \ Merge branch 'backport-3.17-automoc-depend-project-file' into release-3.17Brad King2020-08-319-1/+150
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !5166
| * | | | AutoMoc: Restore support for re-running after project file changesJoerg Bornemann2020-08-319-1/+150
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let Ninja decide when to run AutoMoc. This was introduced by commit aebfbcaa46 (AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14, v3.17.0-rc1~58^2). However, AutoMoc was not triggered after adding a new moc-able file to the project. This patch adds the project file (and potentially included files) to the dependencies in the depfile. Now, a re-run of AutoMoc is triggered if the project file changes. Fixes: #21127
* | | | Merge branch 'backport-3.17-cmext-vs16-declval' into release-3.17Brad King2020-08-271-8/+9
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !4971
| * | | | Implement cm::static_reference_cast by declvalSumit Bhardwaj2020-08-271-8/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, cm::static_reference_cast used invoke_result_t and took the address of O::get. This is not in complete conformance with standard. This MR changes the implementation to use std::declval<O>.get() which is always well-defined.
* | | | Merge branch 'backport-3.17-automoc-path-prefix-off' into release-3.17Brad King2020-08-104-5/+7
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !5105
| * \ \ \ Merge branch 'backport-3.16-automoc-path-prefix-off'Brad King2020-08-104-5/+7
| |\ \ \ \ |/ / / / / | | | | _
| * | | Autogen: Turn off moc path prefix generation by defaultJoerg Bornemann2020-08-104-5/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default value of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF` to restore compatibility with behavior of CMake 3.15 and below. C++ source files that are generated by Qt's meta object compiler (moc) include the header file that was passed as input argument to moc. This is usually a path relative to the source directory, for example #include "../../source/dir/myobject.h" That is problematic for reproducible builds as described in #18815. To cope with that, the target property AUTOMOC_PATH_PREFIX was introduced in CMake 3.16 by commit d018d27c10 (Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX), 2019-09-13, v3.16.0-rc1~94^2~4). The property is default-initialized from the variable `CMAKE_AUTOMOC_PATH_PREFIX`, which defaults to `ON`. If this property is ON, and myobject.h is located in an include directory of the target, moc-generated C++ files include the file without the "path prefix": #include "myobject.h" This behavior, however, can break projects that have equally named header files in different include directories. As "not breaking existing projects" trumps "have reproducible builds by default" we change the default of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF`. Also, it is now possible to pass `-DCMAKE_AUTOMOC_PATH_PREFIX=ON` on the CMake command line. Before, it was overridden in `CMakeGenericSystem`. Fixes: #20598 Issue: #18815
* | | Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.17Brad King2020-08-071-0/+5
|\ \ \ | | |/ | |/| | | | Merge-request: !5108
| * | Tests: Isolate RunCMake.FindPkgConfig from caller environmentBrad King2020-08-071-0/+5
| |/ | | | | | | | | Avoid interference from `CMAKE_PREFIX_PATH` and friends if they happen to be set in the environment from which the tests are run.
* | Merge branch 'backport-3.17-automoc_timestamp_deps' into release-3.17Brad King2020-08-058-3/+104
|\ \ | | | | | | | | | Merge-request: !5085
| * | AutoGen: Add test to check for correct AutoMoc dependenciesAlexandru Croitor2020-08-036-0/+56
| | | | | | | | | | | | | | | | | | When using Qt 5.15.0 or above together with Ninja, check that touching a source file of a dependency does not needlessly re-run AUTOMOC for the dependee target.
| * | AutoGen: Fix over-specified direct dependencies of custom commandAlexandru Croitor2020-08-032-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AutoMoc timestamp creating custom command explicitly depended on all dependencies of the origin target (associated to the AutoGen target). When an origin target depended on a shared library 'libfoo.so', if it was re-linked, the AutoMoc custom command would touch its output timestamp file, and thus cause needless rebuilding of sources, despite the shared library not having any influence on the AutoMoc generated files. Introduce a new '<target>_autogen_timestamp_deps' utility target, which will serve as an 'order-only' dependency for the custom command. This will prevent needless rebuilding, because touching 'libfoo.so' will not cause the custom command to be re-executed. The new AutoMoc dependency tree looks like: '_autogen_timestamp_deps (serves as order-only dep)' <- '<target_autogen>/timestamp' file ( + moc deps file) <- '<target>_autogen' target. Fixes: #21020
* | | Merge branch 'ninja-multi-rsp-remove-path' into release-3.17Brad King2020-08-031-10/+2
|\ \ \ | |/ / |/| | | | | Merge-request: !5094
| * | Ninja: Restore shorter path to response filesKyle Edwards2020-08-031-10/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | In commit 99ed39b011 (Ninja Multi-Config: Make link response files per-config, 2020-07-15, v3.17.4~3^2), we added the target directory to the response file under the mistaken assumption that two different targets with the same name could be in different directories. However, this causes the path to the response file to be too long to fit on a command line. Take the path back out, while leaving in the per-config split. Fixes: #21050
* | CMake 3.17.4v3.17.4Brad King2020-07-301-1/+1
| |
* | Merge branch 'bootstrap-intel' into release-3.17Brad King2020-07-241-1/+1
|\ \ | | | | | | | | | Merge-request: !5057
| * | bootstrap: Fix support for Intel compiler with modern GNU system compilerBrad King2020-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On systems with older GNU system compilers, the Intel C++ compiler does not define `__cplusplus` to any version newer than C++11. This prevented `bootstrap` from detecting that a given C++ standard flag has enabled C++17 mode in the compiler. In commit 033a4b12a5 (bootstrap: Extend C++17 check for our cast functions, 2019-12-14, v3.17.0-rc1~291^2) we added a preprocessor condition to attempt to detect C++17 mode in the Intel compiler on such systems by looking for `__cpp_if_constexpr`. However, on systems with a modern GNU system compiler, that definition is available even in C++11 mode. Switch to using `__cpp_deduction_guides` to detect C++17 mode for the Intel C++ compiler. That seems to be defined exclusively in C++17 mode regardless of the version of the system compiler. Fixes: #21013
* | | Merge branch 'backport-3.17-graphviz-restore-per-target' into release-3.17Brad King2020-07-215-7/+201
|\ \ \ | | | | | | | | | | | | Merge-request: !5039
| * | | Tests: Cover Graphviz support for per-target dependency graph optionsStephan Rohmen2020-07-213-0/+56
| | | | | | | | | | | | | | | | Issue: #20928
| * | | Graphviz: Restore support for per-target dependency graph optionsStephan Rohmen2020-07-212-7/+145
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behaviors controlled by options `GRAPHVIZ_GENERATE_PER_TARGET` and `GRAPHVIZ_GENERATE_DEPENDERS` were broken by commit 553658393c (Graphviz: added test suite, fixes, enhancements, 2019-10-08, v3.17.0-rc1~615^2). It had not been covered in the test suite previously, and those changes left out checks for these features from the `default_options` case. Implement the previously-existing behavior in the new graphviz generation engine added by the above-mentioned commit. Fixes: #20928
* | | Merge branch 'ninja-multi-rsp' into release-3.17Brad King2020-07-161-4/+14
|\ \ \ | | | | | | | | | | | | Merge-request: !5020
| * | | Ninja Multi-Config: Make link response files per-configKyle Edwards2020-07-161-4/+14
| |/ / | | | | | | | | | Fixes: #20961
* | | Merge branch 'FindOpenSSL-3.0' into release-3.17Brad King2020-06-081-2/+4
|\ \ \ | | | | | | | | | | | | Merge-request: !4860
| * | | FindOpenSSL: Fix OpenSSL 3.0.0 version extractionBilly Brumley2020-06-081-2/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | Fix the regex syntax added by commit 61d746e592 (FindOpenSSL: Detect OpenSSL 3.0.0, 2020-05-27, v3.17.3~1^2). Add missing escapes. Test with `openssl-3.0.0-alpha3`. While at it, also unset a temporary variable after use.
* | | Merge topic 'pch-no-Fortran' into release-3.17Brad King2020-06-032-11/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 10c88c4337 PCH: Do not enable GNU or Intel PCH settings for Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4843
| * | | PCH: Do not enable GNU or Intel PCH settings for FortranBrad King2020-06-022-11/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The PCH settings are shared by C and CXX languages but do not make sense for Fortran. In particular, `CMAKE_PCH_EXTENSION` should not be set because it can overwrite the value set for C/C++ languages, which may have a different compiler vendor than the Fortran compiler. Fixes: #20752
* | | Merge topic 'vs-sln-version-16' into release-3.17Brad King2020-06-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b69010b719 VS: Fix .sln support for VS Version Selector with VS 2019 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4844
| * | | VS: Fix .sln support for VS Version Selector with VS 2019Brad King2020-06-021-1/+1
| |/ / | | | | | | | | | | | | | | | VS 2019 changed the naming pattern used by 2015 and 2017. Fixes: #20783
* | | Merge branch 'release-3.16' into release-3.17Brad King2020-06-010-0/+0
|\ \ \ | | |/ | |/|
| * | CMake 3.16.8v3.16.8Brad King2020-06-011-1/+1
| | |
| * | Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' into release-3.16Brad King2020-05-293-5/+22
| |\ \ | | | | | | | | | | | | Merge-request: !4815
* | \ \ Merge topic 'pch-fix-bad-ClearSourcesCache' into release-3.17Brad King2020-06-013-5/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 902858367f Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' fa7b041eca PCH: Fix logic error that incorrectly clears sources during VS generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4815
| * \ \ \ Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache'Brad King2020-05-293-5/+22
| |\ \ \ \ | | | |/ / | | |/| / | | |_|/ | |/| |
| | * | PCH: Fix logic error that incorrectly clears sources during VS generationBrad King2020-05-293-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 729d997f10 (Precompile Headers: Add REUSE_FROM signature, 2019-08-30, v3.16.0-rc1~101^2), `GetPchFileObject` handles the case that it is called first for another target's `REUSE_FROM` by calling `AddSource` to make sure `GetObjectName` can produce the correct object name. However, `AddSource` causes `ClearSourcesCache` to be called, which since commit a9f4f58f0c (cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache, 2020-05-15, v3.16.7~2^2) now correctly erases the `AllConfigSources` structure. This is okay during `AddPchDependencies`, but there is another code path in which it is problematic. When the Visual Studio generator's `WriteAllSources` method is looping over the sources, the `cmake_pch.cxx` source is encountered first. This causes `OutputSourceSpecificFlags` to call `GetPchCreateCompileOptions`, which calls `GetPchFile`, which under MSVC with `CMAKE_LINK_PCH` calls `GetPchFileObject`. That leads to `ClearSourcesCache` erasing the structure over which `WriteAllSources` is iterating! This bug is caught by our `RunCMake.PrecompileHeaders` test when run with the VS generator as of the commit that exposed it by fixing `ClearSourcesCache`. However, that change was backported to the CMake 3.16 series after testing only with later versions versions that contain commit a55df20499 (Multi-Ninja: Add precompile headers support, 2020-01-10, v3.17.0-rc1~136^2). By adding proper multi-config support for PCH, that commit taught `cmLocalGenerator::AddPchDependencies` to call `GetPchFile` with the real set of configurations instead of just the empty string. This allows the `GetPchFile` cache of PCH sources to be populated up front so that the later calls to it in the `WriteAllSources` loop as described above do not actually call `GetPchFileObject` or `ClearSourcesCache`. That hid the problem. Fix this by re-ordering calls to `AddPchDependencies` to handle `REUSE_FROM` targets only after the targets whose PCH they re-use. Remove the now-unnecessary call to `AddSource` from `GetPchFileObject` so that `ClearSourcesCache` is never called during `WriteAllSources`. Update the PchReuseFrom test case to cover an ordering of targets that causes generators to encounter a `REUSE_FROM` target before the target whose PCH it re-uses. Fixes: #20770
* | | | Merge topic 'ninja-multi-export-all-symbols' into release-3.17Brad King2020-06-012-1/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6fc4bfa11c Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Reinking <alex_reinking@berkeley.edu> Merge-request: !4825
| * | | | Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLSKyle Edwards2020-05-292-1/+4
|/ / / / | | | | | | | | | | | | Fixes: #20775
* | | | Merge topic 'FindSubversion-xcode-removed' into release-3.17Brad King2020-05-291-2/+11
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4813
| * | | FindSubversion: Do not accept macOS stub without Xcode implementationBrad King2020-05-281-2/+11
|/ / / | | | | | | | | | | | | Xcode no longer provides a `svn` implementation, but the `/usr/bin/svn` stub may still exist.
* | | CMake 3.17.3v3.17.3Brad King2020-05-281-1/+1
| | |
* | | Merge topic 'openssl-3.0.0' into release-3.17Brad King2020-05-281-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4805