Commit Graph

37687 Commits

Author SHA1 Message Date
Brad King
066fe644ee Merge branch 'automoc-apple-framework' into release-3.10
Merge-request: !1561
2017-12-07 09:13:45 -05:00
Sebastian Holtermann
e4ccc68429 Autogen: Tests: Add test for MacOS frameworks 2017-12-07 09:05:58 -05:00
Sebastian Holtermann
fcbd02fd6e Autogen: Fix for AUTOMOC on macOS frameworks in CMake 3.10
Revert the library target dependency forwarding to the `_autogen` target
to the 3.9.6 way, only now using `GetLinkImplementationLibraries`.

Fixes: #17278
2017-12-07 09:04:05 -05:00
Brad King
afae027d63 Merge branch 'gtest-discovery-timeout' into release-3.10
Merge-request: !1534
2017-12-07 08:03:11 -05:00
Brad King
05f86af716 Merge branch 'backport-revert-server-target-backtraces' into release-3.10
Merge-request: !1564
2017-12-06 13:46:55 -05:00
Brad King
8b2736c71c server: Revert "Report backtraces in codemodel response"
The backtrace information is very repetitive and hugely increases the
size of the codemodel object.  We need to remove it until an alternative
representation can be developed.  Revert commit v3.10.0-rc1~393^2
(server: Report backtraces in codemodel response, 2017-06-20), except
for the protocol version number (because it indicates other new things).

Unfortunately this is incompatible with clients that expect the
"crossReferences" field in targets.  However, the regression in memory
usage is quite serious, especially on large projects, and therefore
breaks even older clients that do not use backtraces.  Since the
"crossReferences" field was only provided by one release (3.10.0), it is
simplest to revert it outright for 3.10.1.

Fixes: #17502
2017-12-06 11:39:03 -05:00
Matthew Woehlke
935848a8a7 GoogleTest: Add test for missing test executable
Add a test to verify expected behavior when a test executable on which
gtest_discover_tests is invoked was not built. (The test for the newly
added timeout conveniently sets up this situation, so this new test was
almost trivial to add.)
2017-12-06 07:37:48 -05:00
Matthew Woehlke
29731d8919 GoogleTest: Add timeout to discovery
Add a TIMEOUT option to gtest_discover_tests. This provides a
work-around in case a test goes out to lunch, rather than causing the
build to simply hang. (Although this is still a problem with the user's
project, hanging the build is not cool, especially in the case of
automatically running CI builds. It is much preferred that the build
should actively fail in this case, and it is trivially easy for us to
implement that.)
2017-12-06 07:37:48 -05:00
Brad King
0418e91f7d Merge branch 'findmpi-notfound-spam' into release-3.10
Merge-request: !1557
2017-12-05 08:37:10 -05:00
Brad King
64184762f4 Merge branch 'findmpi-found-cond' into release-3.10
Merge-request: !1556
2017-12-05 08:36:52 -05:00
Christian Pfeiffer
2047eb360d FindMPI: Fix multiple configure runs
Due to a erroneous logical dependency on a temporary variable, FindMPI
would depend its FOUND status on the set of flags needed to support
compiler-implicit MPI support after the first configure run.

This behavior is especially causing a misreported NOT FOUND status after
the first run on MPI implementations without MPI compiler like MS-MPI or
MPICH2 on Windows.
2017-12-05 14:17:27 +01:00
Christian Pfeiffer
bde7513d2f FindMPI: Correct legacy variable handling
Due to a minor logic error, MPI_LIBRARY, MPI_EXTRA_LIBRARY and
MPI_<LANG>_LIBRARIES hints are currently not correctly handled and
discarded.

Additionally, if either C or CXX aren't enabled, there subsequent calls
to FindMPI will cause cache variables of the sort "MPI_MPI_EXTRA_LIBRARY-NOTFOUND"
to appear due to an error in the compatibility handling. (Doesn't affect
functionality)
2017-12-05 14:14:40 +01:00
Brad King
64713d4ca0 Merge branch 'cpack-pkg-fix' into release-3.10
Merge-request: !1547
2017-12-01 10:53:10 -05:00
Alexander Wittig
f25d87db9e CPack: Fix macOS PKG component dependency information
Refactoring in commit v3.7.0-rc1~523^2 (CPack/PackageMaker: port to
cmXMLWriter, 2016-06-08) accidentally broke `distribution.dist`
generation when there are dependencies between components and the pkg
(or the derived productbuild) generator are used.  The resulting
package cannot be installed and instead the Apple Installer app
shows a "Javascript error" message.

The problem is that a `std::ostringstream` is constructed with some
content, but the stream pointer still points to the beginning of the
stream, so subsequent writes overwrite the initial content instead of
appending.
2017-12-01 10:52:55 -05:00
Matthew Woehlke
e99e39829b GoogleTest: Improve gtest_discover_tests messages
Adjust the formatting of error messages produced when test discovery
goes wrong, in order to avoid spurious line breaking.
2017-11-30 15:07:52 -05:00
Brad King
085bdf5aad Merge branch 'bootstrap-clang-5' into release-3.10
Merge-request: !1542
2017-11-30 14:02:43 -05:00
Adam Ciarciński
375eca7881 bootstrap: Check support for unordered_map from compiler mode
Some versions of clang 5 (with libc++) have a problem with
`unordered_map` under `-std=gnu++1z`:

    /usr/include/c++/__hash_table:1134:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>'

Include `unordered_map` in our test source so that we reject this
combination and fall back to an older C++ standard flag.

Fixes: #17526
2017-11-30 14:01:26 -05:00
Brad King
79ad921a38 Merge branch 'clang-cl-fix' into release-3.10
Merge-request: !1522
2017-11-28 11:09:53 -05:00
İsmail Dönmez
f969f1a9ce
Clang: Do not mistake clang-cl 6.0 for GNU-like clang
The check added by commit v3.10.0-rc2~2^2 (Clang: Diagnose unsupported
GNU-like clang targeting MSVC ABI, 2017-10-10) is incorrectly detecting
clang-cl 6.0 as GNU-like.  Currently cmake is testing if the clang
compiler accepts `--version` to see if it accepts GNU style flags.
However, with the latest llvm snapshot this also works for clang-cl:

    > clang-cl --version
    clang version 6.0.0 (trunk)
    Target: x86_64-pc-windows-msvc
    Thread model: posix
    InstalledDir: C:\Program Files\LLVM\bin

So instead we should use the `/?` flag which fails with clang but
works with clang-cl:

    > clang-cl /? &> /dev/null; echo $?
    0
    > clang /? &> /dev/null; echo $?
    1

Fixes: #17518
2017-11-28 17:08:33 +01:00
Brad King
93e7eb7bc5 Merge branch 'cuda-implicit-include-dirs' into release-3.10
Merge-request: !1528
2017-11-27 10:26:52 -05:00
Brad King
2f72573a62 CUDA: Treat /usr/include as an implicit include directory
We already do this for C and C++.

Fixes: #17512
2017-11-27 10:24:13 -05:00
Brad King
c2019d7c0c Merge branch 'gtest-fix-discovery' into release-3.10
Merge-request: !1510
2017-11-21 12:05:47 -05:00
Matthew Woehlke
70f9f62da8 GoogleTest: Fix multiple discovery on same target
According to the documentation, tests can be discovered for a target
multiple times by using a different prefix and/or suffix to ensure name
uniqueness. However, while this worked for gtest_add_tests, it did not
work with gtest_discover_tests because the generated file that sets up
the tests was named based only on the target name, and so subsequent
discovery from the same target would clobber earlier discovery.

Fix this by introducing a counter that records how many times discovery
has been used on a target, and use this to generate unique names of the
generated test list files.
2017-11-21 12:05:34 -05:00
Brad King
7746fdb2fe CMake 3.10.0 2017-11-20 10:27:59 -05:00
Brad King
a347de186c Merge branch 'fix-cmake-server-bad-buffering' into release-3.10
Merge-request: !1498
2017-11-20 09:30:04 -05:00
vector-of-bool
01c42155cc server: Fix regression in partial message handling
If a partial message is flushed into the input pipe for CMake Server,
the parser will try and parse it as a full message because of some bad
loop checks.  This was introduced accidentally in commit
v3.10.0-rc1~365^2~2 (server: Refactor to make the event loop owned by
server object, 2017-03-24).
2017-11-20 09:25:20 -05:00
Brad King
47c2baf06a Merge branch 'FindOpenGL-glvnd-preference' into release-3.10
Merge-request: !1485
2017-11-15 13:46:05 -05:00
Brad King
ff3c11eeac FindOpenGL: Add option to prefer GLVND for legacy GL
Since commit v3.10.0-rc5~3^2 (FindOpenGL: Default to non-GLVND libraries
for legacy GL, 2017-11-08) users may set `OPENGL_gl_LIBRARY` to empty to
use GLVND components for the legacy GL interfaces.  This is useful only
when one knows in advance that the GLVND components will be found.

Add a `OpenGL_GL_PREFERENCE` variable to specify a preference for legacy
GL or GLVND.  The latter can suppress `OPENGL_gl_LIBRARY` only when the
needed GLVND components are found.  If no preference is explicitly
specified, choose a default based on whether GLVND components were
requested (because this indicates the project has been updated for
CMake 3.10).

Issue: #17437
Issue: #17449
2017-11-15 13:44:59 -05:00
Brad King
aadc38c7fd FindOpenGL: Re-order component library searches
Move the search for the legacy GL library to after the GLVND libraries.
For now we still always look for both.
2017-11-15 11:46:58 -05:00
Brad King
269ea83eb2 Merge branch 'cmake-gui-qt-static-windows' into release-3.10
Merge-request: !1476
2017-11-14 07:19:51 -05:00
Brad King
3a993c49db Tests: Add options to disable tests requiring Qt 2017-11-13 13:58:32 -05:00
Brad King
27a73f1613 cmake-gui: Add build option to use Qt5 windows plugin statically
This will enable builds against a static Qt5 on Windows.
2017-11-13 09:54:49 -05:00
Brad King
78f5d571e4 CMake 3.10.0-rc5 2017-11-10 10:46:29 -05:00
Brad King
98a78f3450 Merge branch 'windows-mt-update-quiet' into release-3.10
Merge-request: !1470
Merge-request: !1473
2017-11-10 10:42:31 -05:00
Brad King
2201ecec44 Windows: Do not report manifest tool update notification as failure
A diagnostic message added in commit v3.10.0-rc1~59^2 (Windows: Improve
link-time error messages when rc or mt fail, 2017-09-22) incorrectly
reports the `mt /notify_update` special return code as a failure.
Fix the logic to consider the special return codes as success.

Fixes: #17444
2017-11-10 10:41:50 -05:00
Brad King
fa5090b441 Merge branch 'doxygen_dot' into release-3.10
Merge-request: !1472
2017-11-10 10:34:34 -05:00
André Apitzsch
9cab8570fa FindDoxygen: Fix setting of HAVE_DOT in non-backward-compat mode
`DOXYGEN_DOT_FOUND` is only set if `_Doxygen_keep_backward_compat` is
used (when no components are requested), so use `Doxygen_dot_FOUND`
directly.  Preserve the "YES" or "NO" value used previously.
2017-11-10 08:49:37 -05:00
Brad King
1f15324824 Merge branch 'FindOpenGL-no-glvnd-for-GL' into release-3.10
Merge-request: !1466
2017-11-09 13:13:54 -05:00
Brad King
e6b209c870 FindOpenGL: Default to non-GLVND libraries for legacy GL
Projects using `OPENGL_LIBRARIES` or `OpenGL::GL` expect legacy GL.
Although GLVND OpenGL+GLX provides legacy GL interfaces, using those
library files may conflict with legacy GL library files used by
dependencies (or dependents) of such projects.  Therefore we should
not yet use OpenGL+GLX when a legacy GL library is available.

If `OPENGL_gl_LIBRARY` is set then use it as the legacy GL library.
If it is *not* set then fall back to using GLVND OpenGL+GLX to provide
legacy GL interfaces.  This will allow users to build projects using
GLVND even if they have not been ported.

Fixes: #17437
2017-11-09 09:47:12 -05:00
Brad King
24ca336981 Merge branch 'FindHDF5-c-version' into release-3.10
Merge-request: !1465
2017-11-08 09:39:05 -05:00
Axel Huebl
a6abb6c8b6 FindHDF5: Fix H5_VERSION on Patch in C
Fix a typo from commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of
compiler wrappers, 2016-04-04) that accidentally used the HDF5 C++
version (which could be empty) while detecting the C patch version.
The detection failed for patch releases, such as `1.10.0-patch1`
becoming `.1` instead of `1.10.0.1`.
2017-11-08 09:35:45 -05:00
Brad King
ddf485511b Merge branch 'implicit-lib-gcceh' into release-3.10
Merge-request: !1460
2017-11-08 08:12:08 -05:00
Christian Pfeiffer
41aacca7fb Restore exclusion of "gcc_eh" from implicit link libraries
Since commit v3.9.0-rc1~148^2 (Do not assume GCC libs are linked by all
compilers, 2017-05-05) we no longer filter out all `gcc*` implicit link
libraries.  This allows mixing of gcc and non-gcc compilers across
languages.  However, this caused a subtle problem with how GCC makes
exception handling symbols available to linked binaries.

GCC (at least on MinGW) provides two different libraries with exception
handling symbols:

* gcc_s: A shared library with -fvisibility=default, used by -shared-libgcc.
* gcc_eh: A static library with -fvisibility=hidden, used by -static-libgcc.

The C compiler (on MinGW) defaults to -static-libgcc and uses gcc_eh.
The C++ compiler defaults to -shared-libgcc and uses gcc_s when linking
shared libraries and executables so that exceptions can propagate across
shared libraries [1].  When linking a mixed-language binary, the C++
compiler should be used along with its choice of gcc_s.  In this case
gcc_eh should not be added even though the C compiler implies it because
gcc_s supersedes it.

Since the above-mentioned change, CMake is adding gcc_eh to C++ link
lines that also contain C code on MinGW.  This causes both gcc_s and
gcc_eh to be used, which is incorrect.  We can fix this simply by
excluding gcc_eh from the C compiler's implicit link libraries.

[1] https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Link-Options.html#Link-Options

Fixes: #17436
2017-11-08 08:10:52 -05:00
Brad King
575250b6c4 Merge branch 'FindOpenGL-clarify-libraries' into release-3.10
Merge-request: !1459
2017-11-07 09:35:04 -05:00
Brad King
f44fb2dd4c FindOpenGL: Clarify logic constructing OPENGL_LIBRARIES
Our comment says the logic matches that for OpenGL::GL.  Structure
the logic the same way to make this clearer.

Issue: #17437
2017-11-07 09:33:43 -05:00
Brad King
9a0d3e2ed6 Merge branch 'csharp-version-english' into release-3.10
Merge-request: !1449
2017-11-07 08:23:36 -05:00
Yoshinori Tahara
04937db103 CSharp: Fix compiler version detection in non-English languages
When we run `csc.exe /help` we look for "Version" in the output.
Explicitly ask for the output in English.

Reported-by: guttally@users.noreply.github.com
2017-11-07 08:23:16 -05:00
Brad King
6f80b10c83 Merge branch 'irsl-win2018' into release-3.10
Merge-request: !1451
2017-11-06 14:11:39 -05:00
Christian Pfeiffer
f6994f436c IRSL: Add support for the 2018 release on Windows.
Fixes: #17421
2017-11-06 14:10:45 -05:00
Brad King
45da558742 CMake 3.10.0-rc4 2017-11-01 08:26:04 -04:00