Commit Graph

47102 Commits

Author SHA1 Message Date
Brad King
e82bc5940c Merge branch 'bootstrap-intel' into release-3.17
Merge-request: !5057
2020-07-24 08:59:11 -04:00
Brad King
796466284b bootstrap: Fix support for Intel compiler with modern GNU system compiler
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
2020-07-24 08:53:13 -04:00
Brad King
e817818926 Merge branch 'backport-3.17-graphviz-restore-per-target' into release-3.17
Merge-request: !5039
2020-07-21 16:35:53 -04:00
Stephan Rohmen
f3a6b4a209 Tests: Cover Graphviz support for per-target dependency graph options
Issue: #20928
2020-07-21 14:55:44 -04:00
Stephan Rohmen
93549b9224 Graphviz: Restore support for per-target dependency graph options
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
2020-07-21 14:55:44 -04:00
Brad King
ffe425f768 Merge branch 'ninja-multi-rsp' into release-3.17
Merge-request: !5020
2020-07-16 12:02:54 -04:00
Kyle Edwards
99ed39b011 Ninja Multi-Config: Make link response files per-config
Fixes: #20961
2020-07-16 11:57:46 -04:00
Brad King
5a745cfbe0 Merge branch 'FindOpenSSL-3.0' into release-3.17
Merge-request: !4860
2020-06-08 08:25:59 -04:00
Billy Brumley
796b447373 FindOpenSSL: Fix OpenSSL 3.0.0 version extraction
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.
2020-06-08 08:24:57 -04:00
Brad King
37955f87d6 Merge topic 'pch-no-Fortran' into release-3.17
10c88c4337 PCH: Do not enable GNU or Intel PCH settings for Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4843
2020-06-03 06:04:39 -04:00
Brad King
73086daa57 Merge topic 'vs-sln-version-16' into release-3.17
b69010b719 VS: Fix .sln support for VS Version Selector with VS 2019

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4844
2020-06-03 06:03:43 -04:00
Brad King
b69010b719 VS: Fix .sln support for VS Version Selector with VS 2019
VS 2019 changed the naming pattern used by 2015 and 2017.

Fixes: #20783
2020-06-02 10:30:33 -04:00
Brad King
10c88c4337 PCH: Do not enable GNU or Intel PCH settings for Fortran
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
2020-06-02 08:23:40 -04:00
Brad King
20ca1c018f Merge branch 'release-3.16' into release-3.17 2020-06-01 09:31:13 -04:00
Brad King
39c6ac5112 CMake 3.16.8 v3.16.8 2020-06-01 07:56:25 -04:00
Brad King
f671372735 Merge topic 'pch-fix-bad-ClearSourcesCache' into release-3.17
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
2020-06-01 07:44:34 -04:00
Brad King
70b8a2863f Merge topic 'ninja-multi-export-all-symbols' into release-3.17
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
2020-06-01 07:36:49 -04:00
Kyle Edwards
6fc4bfa11c Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
Fixes: #20775
2020-05-29 15:28:43 -04:00
Brad King
1e4aaa31dd Merge topic 'FindSubversion-xcode-removed' into release-3.17
2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4813
2020-05-29 07:11:57 -04:00
Brad King
5ff1a2521b Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' into release-3.16
Merge-request: !4815
2020-05-29 06:20:41 -04:00
Brad King
902858367f Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache' 2020-05-29 06:14:59 -04:00
Brad King
fa7b041eca PCH: Fix logic error that incorrectly clears sources during VS generation
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
2020-05-29 05:52:03 -04:00
Brad King
2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation
Xcode no longer provides a `svn` implementation, but the `/usr/bin/svn`
stub may still exist.
2020-05-28 11:37:47 -04:00
Brad King
e647949539 CMake 3.17.3 v3.17.3 2020-05-28 06:57:26 -04:00
Brad King
54eeccbfb6 Merge topic 'openssl-3.0.0' into release-3.17
61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4805
2020-05-28 06:51:52 -04:00
Brad King
1b8b98a884 Merge topic 'fix-cpack-deb-generating-empty-paragraph' into release-3.17
6ba842163c CPack-deb: don't add a line with a dot to pkg desc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4806
2020-05-28 06:50:40 -04:00
Jonathan Verner
6ba842163c CPack-deb: don't add a line with a dot to pkg desc
Currently, if the package description ends with a newline
(typically if it is read from a file) cpack -deb adds a single line
with a dot at the end which leads to a violation of the
`extended-description-contains-empty-paragraph` debian policy.

This commit fixes the above behaviour.

Fixes: #20763
2020-05-27 14:44:28 -04:00
Vitezslav Cizek
61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0
The OpenSSL versioning is changing with the upcoming 3.0.0 release.
https://www.openssl.org/blog/blog/2018/11/28/version/
Since 3.0.0, the patch letters are being dropped. The new format is:
MAJOR.MINOR.PATCH

The OPENSSL_VERSION variable can now be directly derived from the new
OPENSSL_VERSION_STR macro.
https://www.openssl.org/docs/manmaster/man3/OPENSSL_VERSION_NUMBER.html
2020-05-27 09:08:10 -04:00
Brad King
6fce0cbcab Merge topic 'ctest-repeat-notrun' into release-3.17
bbb62dcc72 CTest: Make sure NOT_RUN tests show up in the failed test log
c503251997 Tests: Add coverage of ctest_test RETURN_VALUE and REPEAT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4801
2020-05-27 08:14:21 -04:00
Brad King
6e1079dfdb Merge branch 'release-3.16' into release-3.17 2020-05-27 08:12:20 -04:00
Robert Maynard
bbb62dcc72 CTest: Make sure NOT_RUN tests show up in the failed test log
Issue: #20543
2020-05-27 06:43:01 -04:00
Robert Maynard
c503251997 Tests: Add coverage of ctest_test RETURN_VALUE and REPEAT 2020-05-27 06:39:17 -04:00
Brad King
e14974a208 CMake 3.16.7 v3.16.7 2020-05-27 06:13:45 -04:00
Brad King
15e7259418 Merge topic 'doc-updates' into release-3.17
b3e4fb5144 Help: clarify add_definitions() and add_compile_definitions() behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4786
2020-05-25 15:50:18 -04:00
Brad King
f0ff991e42 Merge topic 'ninja-multi-install' into release-3.17
dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4778
2020-05-25 10:33:26 -04:00
Marc Chevrier
b3e4fb5144 Help: clarify add_definitions() and add_compile_definitions() behavior
Fixes: #20736
2020-05-24 12:47:24 +02:00
Kyle Edwards
dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs
And add an "install:all" target.

Fixes: #20713
2020-05-22 13:15:50 -04:00
Brad King
0781540a80 Merge topic 'cuda-default-runtime' into release-3.17
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4762
2020-05-22 06:55:37 -04:00
Brad King
0c557a0cab Merge topic 'FindPython-debug-library-lookup' into release-3.17
71e6854b22 FindPython: use CMAKE specific variables to look-up debug library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4764
2020-05-21 11:36:08 -04:00
Robert Maynard
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.

To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.

Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
2020-05-21 11:15:03 -04:00
Robert Maynard
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile 2020-05-20 14:36:55 -04:00
Robert Maynard
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability 2020-05-20 14:36:55 -04:00
Brad King
1174efb6f9 Merge topic 'vs-sln-version' into release-3.17
88ad02f1ec VS: Restore .sln support for VS Version Selector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4765
2020-05-20 09:03:23 -04:00
Brad King
041e57a2b0 Merge branch 'vs-sln-version' into release-3.16
Merge-request: !4765
2020-05-19 08:39:59 -04:00
Brad King
88ad02f1ec VS: Restore .sln support for VS Version Selector
Since commit 3b51343ea1 (VS: Emit UTF-8 BOM for generated solution files,
2019-08-19, v3.16.0-rc1~237^2) the `.sln` file does not work with the
VS Version Selector.  Add a newline after the BOM to restore support.

Fixes: #20725
2020-05-19 08:24:37 -04:00
Brad King
00949be941 Merge topic 'fix-ClearSourcesCache' into release-3.17
a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4751
2020-05-18 12:23:40 -04:00
Marc Chevrier
71e6854b22 FindPython: use CMAKE specific variables to look-up debug library
Fixes: #20714
2020-05-18 15:01:26 +02:00
Brad King
4d85ad8c98 Merge topic 'backport-3.16-FindPkgConfig-isystem' into release-3.17
3719ddd3f3 Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4752
2020-05-15 10:32:49 -04:00
Brad King
36599e2a7a Merge branch 'fix-ClearSourcesCache' into release-3.16
Merge-request: !4751
2020-05-15 09:53:05 -04:00
Brad King
481100ecbc Merge branch 'backport-3.16-FindPkgConfig-isystem' into release-3.16
Merge-request: !4752
2020-05-15 09:48:51 -04:00