Commit Graph

8071 Commits

Author SHA1 Message Date
Brad King
9100ea1d82 Merge topic 'FindOpenGL-glvnd-policy'
2ea17412 FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !1491
2017-11-20 09:43:27 -05:00
Brad King
6e07850544 Merge topic 'blas-lapack-flame'
f5bc7826 Find{BLAS,LAPACK}: Add support for FLAME blis and libflame

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1486
2017-11-17 10:18:21 -05:00
Brad King
7dfeafaaaa Merge topic 'FindRuby-through-2.4'
cd2cdfe2 FindRuby: Add support for versions 2.2, 2.3, and 2.4
23ab451a FindRuby: Fix match of '.' in version numbers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1493
2017-11-17 10:15:25 -05:00
Christian Pfeiffer
8e6d6337cd Merge topic 'fomp-cmp0012'
36cc4378 FindOpenMP: Enable policy CMP0012

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1490
2017-11-17 07:20:37 -05:00
Brad King
2ea17412a9 FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GL
Fixes: #17449
2017-11-17 07:17:28 -05:00
J M Dieterich
f5bc78263e Find{BLAS,LAPACK}: Add support for FLAME blis and libflame
FLAME (github.com/flame) provides a variety of numerical libraries.
`blis` and `libflame` can be setup to expose BLAS/LAPACK interfaces.

Fixes: #17470
2017-11-16 11:43:15 -05:00
Brad King
b9ef87431b Merge topic 'FindMatlab-better-host-detect'
9f1916aa FindMatlab: Avoid if() auto-dereference in 64-bit host detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1482
2017-11-16 10:52:23 -05:00
Brad King
ee5867287a Merge topic 'fomp-no-def-path'
98314d53 FindOpenMP: Use NO_DEFAULT_PATH where appropriate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1481
2017-11-16 10:51:20 -05:00
Brad King
5b34fb2021 Merge topic 'fmpi-command-not-found'
1615cded FindMPI: Treat 'command not found' as an error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1483
2017-11-16 10:50:39 -05:00
Brad King
8f9301ba25 Merge topic 'msvc-version'
3bc21a70 MSVC: Fix MSVC_VERSION when mixing MSVC C/C++ with Intel Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1488
2017-11-16 10:50:01 -05:00
Brad King
2392f6ea3e Merge topic 'FindOpenGL-glvnd-preference'
ff3c11ee FindOpenGL: Add option to prefer GLVND for legacy GL
aadc38c7 FindOpenGL: Re-order component library searches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !1485
2017-11-16 10:48:10 -05:00
Christian Pfeiffer
36cc43788a FindOpenMP: Enable policy CMP0012
Fixes: #17476
2017-11-16 15:22:37 +01:00
Brad King
cd2cdfe253 FindRuby: Add support for versions 2.2, 2.3, and 2.4
Author: J. Peter Mugaas (jpmugaas on gitlab.kitware.com)
Fixes: #17475
2017-11-16 07:05:00 -05:00
Brad King
23ab451a13 FindRuby: Fix match of '.' in version numbers
Escape `.` so that it is matched literally and not treated as a
special match of any character by the regex.
2017-11-16 07:02:26 -05:00
Brad King
3bc21a70b5 MSVC: Fix MSVC_VERSION when mixing MSVC C/C++ with Intel Fortran
When using a real MSVC compiler for `C` or `CXX`, use the version of
that compiler for `MSVC_VERSION`.  This is preferred over the MSVC
version that a non-MSVC compiler "simulates".

Fixes: #17468
2017-11-15 14:58:44 -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
9f1916aaaa FindMatlab: Avoid if() auto-dereference in 64-bit host detection
If the value of `CMAKE_HOST_SYSTEM_PROCESSOR` also happens to be set as
a variable by a project (e.g. `AMD64`), allowing `if()` to
auto-dereference is unlikely to produce a value that matches "64".
Instead let `if()` auto-dereference `CMAKE_HOST_SYSTEM_PROCESSOR`.

Fixes: #17460
2017-11-15 09:33:56 -05:00
Christian Pfeiffer
1615cdedf5 FindMPI: Treat 'command not found' as an error
If the compiler given in I_MPI_... could not be found, the Intel MPI
wrappers emit an error like "line 590: ifort: command not found".
The script should currently fail to match the output of this for
information, but we should generally treat such an output as invalid,
since the displayed configuration line can become a mixup between Intel
and GNU compiler settings.
2017-11-15 15:27:35 +01:00
Christian Pfeiffer
98314d536e FindOpenMP: Use NO_DEFAULT_PATH where appropriate
OpenMP libraries must always be found in the implicit linking
directories of a compiler when using the OpenMP compile flag. If a suitable OpenMP library is also found in for example some CMAKE_PREFIX_PATH, this can lead to the module finding the incorrect library.
On the other hand, CMAKE_PREFIX_PATH can't ever be a location that we
need to consider since the OpenMP compile flag would not work if we
needed to.
2017-11-15 15:05:41 +01:00
Brad King
ac38bb3aa6 Merge topic 'swig-broken-dependency-scan'
2ee10119 swig: fix incremental build in case of removed interface files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1457
2017-11-13 09:53:51 -05:00
Brad King
fa5090b441 Merge branch 'doxygen_dot' into release-3.10
Merge-request: !1472
2017-11-10 10:34:34 -05:00
Brad King
fd93616b74 Merge topic 'doxygen_dot'
9cab8570 FindDoxygen: Fix setting of HAVE_DOT in non-backward-compat mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1472
2017-11-10 10:30:16 -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
Craig Scott
0d7086e3da Merge topic 'fetchcontent-support-use-before-project-command'
b551beb6 FetchContent: Support use of the module before "project()" command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1448
2017-11-10 00:24:50 -05:00
Brad King
c167a9b18c Merge topic 'FindOpenGL-no-glvnd-for-GL'
e6b209c8 FindOpenGL: Default to non-GLVND libraries for legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1466
2017-11-09 13:17:41 -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
a16930167d Merge topic 'FindHDF5-c-version'
a6abb6c8 FindHDF5: Fix H5_VERSION on Patch in C

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1465
2017-11-09 08:30:19 -05:00
Brad King
05d8892e61 Merge topic 'cmake-default-dir-install-permissions'
7e896029 CPack: enable setting default dir creation permissions
a4c82916 CPack test: expand output checking fallback
670ad047 Move file/dir permissions code to common file.
deeba85f CMake: enable setting default dir creation permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1433
2017-11-09 08:28:28 -05:00
Brad King
0682e77f3b Merge topic 'fortran-flags-docstring'
27b62fa4 Fortran: Use same DOC for flags as other languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1463
2017-11-09 08:15:09 -05:00
Domen Vrankar
7e896029cd CPack: enable setting default dir creation permissions
Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS
variable which adds support for functionality introduced
by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable.

Fixes #17333

# Conflicts:
#	Help/release/dev/cmake-default-dir-install-permissions.rst
2017-11-08 20:27:11 +01: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
Felix Schwitzer
2ee10119ea swig: fix incremental build in case of removed interface files
Commit v3.8.0-rc1~123^2 (UseSWIG: Automatically scan dependencies of SWIG files
for Makefiles, 2016-12-21) introduced automatic dependency scanning for files
`%include`d in a swig interface definition file. This works fine as long as no
such file is removed. But removing a dependent file breaks an incremental build
and `make` complains about a missing dependency, see #16830.

Integrate the approach proposed in the issue above into the SWIG-module, do the
workaround in a conditional step as it arises only for Makefile generators. For
other generators use the implementation before that commit.

Fixes: #17433.
2017-11-08 15:25:20 +01:00
Brad King
f8f3338582 Merge topic 'flang-windows'
3c368228 Flang: Add support for compiling sources on Windows
72d27964 Flang: Identify as simulating MSVC on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1430
2017-11-08 09:05:13 -05:00
Brad King
77b73ff134 Merge topic 'irsl-win2018'
f6994f43 IRSL: Add support for the 2018 release on Windows.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1451
2017-11-08 08:59:52 -05:00
Brad King
7bd4c1c1bb Merge topic 'FindOpenGL-clarify-libraries'
f44fb2dd FindOpenGL: Clarify logic constructing OPENGL_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1459
2017-11-08 08:52:01 -05:00
Christian Pfeiffer
27b62fa4c5 Fortran: Use same DOC for flags as other languages
Currently, only Fortran uses the string "Flags for Fortran compiler",
whereas C, CXX, CUDA all use the same, more descriptive string.
2017-11-08 14:50:58 +01:00
Brad King
bd68d0c252 Merge topic 'implicit-lib-gcceh'
41aacca7 Restore exclusion of "gcc_eh" from implicit link libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1460
2017-11-08 08:25:16 -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
Jean-Christophe Fillion-Robin
b551beb6fa FetchContent: Support use of the module before "project()" command
Co-authored-by: Craig Scott <craig.scott@crascit.com>
Co-authored-by: Brad King <brad.king@kitware.com>
2017-11-07 09:50:02 -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
a7347c022e Merge topic 'csharp-version-english'
04937db1 CSharp: Fix compiler version detection in non-English languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1449
2017-11-07 08:31:09 -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
b5d8610430 Merge topic 'findboost-compiler-version'
d70bdc72 FindBoost: support more than one number in version components
335816ef FindBoost: use CMake's compiler version rather than querying again

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1441
2017-11-07 08:21:23 -05:00
Brad King
6f80b10c83 Merge branch 'irsl-win2018' into release-3.10
Merge-request: !1451
2017-11-06 14:11:39 -05:00