7848 Commits

Author SHA1 Message Date
Christian Pfeiffer
2f673da69f FindMPI: Support components for various languages 2017-09-15 14:55:08 +02:00
Christian Pfeiffer
9a58e69cc8 FindMPI: Modernization from ground up
This is a near-total rewrite of FindMPI implementing the following
features:

Environmental improvements:

- C++ settings can now be picked from C settings if no dedicated C++
  settings are found (some installs of IBM Platform MPI)
- Fortran settings can now be found on MPICH-1, MVAPICH-1, Microsoft
  MPI and MPICH-2 on Windows.

- Improved flag procession logic: Flags related to security enhancements
  of MPI itself, and unrelated to MPI usage (-fstack-protector-strong on
  e.g. RHEL 7 for MPICH and MVAPICH) will be filtered out properly now.
  -pthread is now being handled. -fno-strict-aliasing, which may be needed
  while compiling MVAPICH (e.g. RHEL 7's MVAPICH package) is also
  filtered.

Features added:

- MPI version can be determined for each language and is exposed as the
  package version
- MPI functionality is being tested to ensure the correctness of
  settings
- MPI-2 C++ bindings can be suppressed if desired by the project or
  user. For older MPIs, this often resolves issues and eliminated the
  infamous SEEK_SET trouble.
- MPI-2 C++ bindings are now being searched for and exposed by a
  variable if detected.
- Fortran support now does not make assumptions over the MPI present and
  works with ILP64 MPI implementations.
- Fortran now exposes which bindings (mpif.h, mpi/mpi_f08 modules) are
  available
- MPI detection can now work hybridly, which for example permits using the
  Fortran modules shipped with some compiler suites together with MPI
  (e.g. PGI on Windows shipping MSMPI modules)
- Ability to determine MPI library version (*requires* try_run, caution)
  upon request
- Ability to determine Fortran capabilities from MPI-3 for each of the
  bindings (subarrays, asynchronous attribute protecting entities) (also
  requires try_run)

Fine grained control over the search process:

- Possibility to selectively enable and disable steps like compiler
  wrapper search and guessing. Permits picking Microsoft MPI over Intel
  MPI if both are loaded (previously not possible without removing the
  IMPI compiler wrappers from the environment)
- Ability to pick MPICH2 over MSMPI (previously the first one located
  was taken)
- A user may now pass compiler flags to the compiler wrapper script,
  enabling much more flexibility. This permits for example linking the
  Intel MPI debug runtime, static linking, ILP64 with Fortran,
  linking tracing, ...
- A user may define a suffix for all MPI binaries that are being looked
  for (useful on Debian/Ubuntu where the alternative MPI installs are each
  appended with their name, e.g. mpicc.mpich and mpicc.lam)

Cache variable improvements

- Instead of the previous plural cache variables a list-of-variables
  approach is now in place. Permits correcting individual variables
  instead of having to wade through a list, also speeds up the search
  process and increases comfort by eliminating duplicate entries in
  LIBRARIES over languages
- MPIEXEC was corrected to MPIEXEC_EXECUTABLE in order to fix the
  grouping in the CMake GUI for the variable (previously ungrouped)
2017-09-15 14:55:08 +02:00
Brad King
3ea87bce69 Merge topic 'vs-clang-llvm-support'
8a4755ca VS: Update support for LLVM-vs* toolsets from LLVM 5.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1231
2017-09-12 09:39:40 -04:00
Konstantin Ivlev
8a4755ca57 VS: Update support for LLVM-vs* toolsets from LLVM 5.0
Revert commit v3.7.0-rc1~25^2 (VS: Recognize VS/LLVM toolset names as
Clang, 2016-09-28).  Since at least LLVM 5.0 the VS integration of the
LLVM toolchain now mimics cl and accepts MSVC-style command-line
arguments (unlike Microsoft Clang/C2).

Fixes: #17193, #17235
2017-09-11 09:58:22 -04:00
Brad King
71676863bc Merge topic 'find-openssl'
d371b52f FindOpenSSL: Search 'ssld' and 'crypod' for debug variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1246
2017-09-11 08:00:03 -04:00
Brad King
1c9d3c0d32 Merge topic 'doc-find_dependency-return'
e48acfc5 CMakeFindDependencyMacro: Document return() behavior and caveats
07a05079 CMakeFindDependencyMacro: Convert documentation to bracket comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1245
2017-09-11 07:56:02 -04:00
Brad King
e8463e3570 Merge topic 'findmatlab-remove-CMAKE_CL_64'
f34ac1c6 FindMatlab: Don't use the deprecated variable CMAKE_CL_64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1234
2017-09-11 07:47:31 -04:00
Robert Dailey
d371b52fdf FindOpenSSL: Search 'ssld' and 'crypod' for debug variants
Release variant search already considered `ssl` and `crypto`, but
similarly named libs with `d` postfix were not searched for debug
variant.
2017-09-08 13:57:55 -05:00
Brad King
e48acfc501 CMakeFindDependencyMacro: Document return() behavior and caveats
The `find_dependency` macro is designed to be called from Package
Configuration Files, not from Find Modules.  The return() behavior is
particularly problematic for find modules.  Document this more clearly.

Issue: #17257
2017-09-08 10:44:45 -04:00
Brad King
07a05079d3 CMakeFindDependencyMacro: Convert documentation to bracket comment 2017-09-08 10:30:24 -04:00
Job Noorman
f34ac1c69b FindMatlab: Don't use the deprecated variable CMAKE_CL_64
The variable is not defined on 64-bit MinGW, causing a 32-bit Matlab
version to be found.  Check using CMAKE_SIZEOF_VOID_P instead.
2017-09-08 09:53:27 -04:00
Brad King
d4f58a9cd8 Merge topic 'fphsa-version-cleanup'
91935d9e FPHSA: lower-case for cmake_parse_arguments + move config-mode related code
aec27c15 FPHSA: use more localized _FOUND_VERSION instead of VERSION.
0019bfeb FPHSA: Add (failing) unit test in case a cache variable VERSION is present
81844334 FPHSA: add (failing) unit test for found version being equal to 0.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !1224
2017-09-08 09:48:15 -04:00
Brad King
2581ab4395 Merge topic 'boost-1.65.1'
dbba53a5 FindBoost: Add version 1.65.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1241
2017-09-08 09:46:32 -04:00
Brad King
8bd26d7eac Merge topic 'findfreetype-importedtargets'
b1d1c56c Help: Add notes for topic 'FindFreetype-importedtargets'
457c2021 FindFreetype: Add imported target, docs, and test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1219
2017-09-08 09:46:00 -04:00
Ben Morgan
457c202196 FindFreetype: Add imported target, docs, and test 2017-09-07 17:52:33 +01:00
Sebastian Holtermann
37ef18a468 Autogen: Pass RCC build names and function names in info file
- The output file name of the `rcc` command get computed once
  in the AUTOGEN initializer and is passed in the info file.

- The function name for the `-name` option of `rcc` gets computed
  once in the AUTOGEN initializer and is passed along with the
  other `rcc` options in the info file.
2017-09-07 17:53:19 +02:00
Sebastian Holtermann
d1e5eb8497 Autogen: Iterate source files only once
This is a large commit that serves multiple purposes

- Iterate source files only once and store all extracted
  information in a cmQtAutogenDigest class that can be reused.
  This is brings speed improvements because several properties
  are only evaluated once. More that that it helps to avoid
  duplication of code with non trivial files property checks.
- Fix the Visual Studio generator to use PRE_BUILD when possible.
- Convert `for( ... )` loops to C++11 range base loops where possible
  (cmQtAutogen*.cxx only).
- String concatenation optimizations.
2017-09-07 17:53:18 +02:00
Brad King
10a3835cbd Merge topic 'FindBoost-limit-configs'
e6159e18 FindBoost: Add option to prevent finding DEBUG/RELEASE Boost-libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1216
2017-09-07 11:23:00 -04:00
Brad King
14ea80ab0c Merge topic 'findexpat-importedtargets'
3a4f82e9 Help: Add notes for topic 'FindEXPAT-importedtargets'
bfe51369 FindEXPAT: Add unit test of target and variables
78f166f8 FindEXPAT: Add imported target and documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1207
2017-09-07 11:22:26 -04:00
Brad King
67a840b3c8 Merge topic 'irsl-vs15-future'
6dd0a593 Merge branch 'backport-irsl-vs15-future' into irsl-vs15-future
1dd2c08b InstallRequiredSystemLibraries: Add support for future VS 2017 toolchains

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Christian Pfeiffer <cpfeiffer@live.de>
Merge-request: !1240
2017-09-07 11:17:33 -04:00
Roger Leigh
dbba53a5aa FindBoost: Add version 1.65.1 2017-09-06 21:11:47 +01:00
Brad King
05294a0916 Merge topic 'msvc2015-cxx17'
227e3535 MSVC: Extend C++ language standard support to Visual Studio 2015 Update 3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1227
2017-09-06 13:25:48 -04:00
Deniz Bahadir
e6159e1842 FindBoost: Add option to prevent finding DEBUG/RELEASE Boost-libs
With the use of options `Boost_USE_DEBUG_LIBS` and
`Boost_USE_RELEASE_LIBS` it is now possible to skip searching for either
DEBUG or RELEASE Boost libraries.
This is useful if Boost is installed on the system in multiple
directories but only one of them should be used which only contains e.g.
the RELEASE libraries. Without this change the DEBUG libraries might be
found in the other directory which might not be desired at all.
2017-09-06 17:58:45 +02:00
Brad King
6dd0a593d9 Merge branch 'backport-irsl-vs15-future' into irsl-vs15-future 2017-09-06 11:37:30 -04:00
Brad King
1dd2c08b19 InstallRequiredSystemLibraries: Add support for future VS 2017 toolchains
Assume that all cl 19.xx versions will use the same runtime DLL pattern.

Suggested-by: Tomasz Słodkowicz <slodki@users.noreply.github.com>
2017-09-06 11:36:47 -04:00
Brad King
ff0847b2d5 Merge topic 'FindBoost-fix-policy-scope'
ade45fa3 FindBoost: Revert "Simplify search in lists."

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1238
2017-09-06 10:47:49 -04:00
Brad King
e4a78435c1 Merge topic 'findopenmp-found'
91fbda82 FindOpenMP: Restore OpenMP_FOUND result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1233
2017-09-06 10:47:31 -04:00
Brad King
faacd46d39 Merge topic 'android-ndk-r16'
5a1a1177 Android: Update for NDK r16

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Seither <d@fdseither.de>
Merge-request: !1237
2017-09-06 10:46:38 -04:00
Brad King
932ba44f07 Merge topic 'csharp_fix_initial_flags'
a3388900 VS: Initialize CSharp flags consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1232
2017-09-06 10:46:11 -04:00
Yves Frederix
91935d9e54 FPHSA: lower-case for cmake_parse_arguments + move config-mode related code 2017-09-05 21:20:04 +02:00
Yves Frederix
aec27c152e FPHSA: use more localized _FOUND_VERSION instead of VERSION.
This fixes the failing unit tests in which a cache variable VERSION is present or the found version is 0.
2017-09-05 21:20:02 +02:00
Brad King
ade45fa342 FindBoost: Revert "Simplify search in lists."
Revert commit v3.9.0-rc1~41^2 (FindBoost: Simplify search in lists,
2017-04-23).  It regressed the module by exposing issue #17257, but the
fix for that issue is not suitable for inclusion in a patch release.
It is simplest to revert the commit until the larger problem can be
addressed.

Fixes: #17252
2017-09-05 14:04:51 -04:00
Brad King
5a1a1177bf Android: Update for NDK r16
Since NDK commit 90ec78ffd96b87cd75d82575587ead14d6494df1 (Remove Clang
toolchain path from setup.mk, 2017-05-31) the `setup.mk` files for Clang
no longer hold the path to the `toolchains/llvm` directory.  It has been
the same since NDK r11, so use that as the default.

Fixes: #17253
2017-09-05 12:52:09 -04:00
Michael Stürmer
a3388900f8 VS: Initialize CSharp flags consistently
Use the same environment variable for the initial flags that we
use for the compiler id.

Fixes: #17250
2017-09-05 09:58:43 -04:00
Christian Pfeiffer
91fbda8247 FindOpenMP: Restore OpenMP_FOUND result variable
The overhaul in commit v3.9.0-rc1~207^2~1 (FindOpenMP: Complete
overhaul, 2017-04-24) documented this variable but accidentally left it
unset.

Fixes: #17251
2017-09-05 09:54:48 -04:00
Brad King
20e5f7a9c9 Merge topic 'ExternalProject-command'
15617484 ExternalProject: Prevent COMMAND from being treated as a true keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1178
2017-09-05 09:31:06 -04:00
Craig Scott
1561748496 ExternalProject: Prevent COMMAND from being treated as a true keyword
The known keywords for each function are obtained by scraping the
documentation for lines matching a particular regular expression. In
commit 8842a027 (ExternalProject: Improve documentation, 2017-07-09),
the docs were overhauled and the COMMAND docs subsequently matched the
regular expression when they shouldn't have. This made COMMAND appear as
a true keyword, which thwarted the special handling logic elsewhere for
the intended use of COMMAND arguments.

This commit contains a workaround for issue #17229 to force a dependency
of the patch step on the update step to ensure a predictable step order.

Fixes: #17198
2017-09-02 17:53:16 +10:00
Nils Gladitz
227e353595 MSVC: Extend C++ language standard support to Visual Studio 2015 Update 3 2017-09-01 23:33:12 +02:00
Jean-Christophe Fillion-Robin
2645cb6208 FindPatch: Add module to find 'patch' command-line tool 2017-09-01 11:46:28 -04:00
Ben Morgan
78f166f873 FindEXPAT: Add imported target and documentation 2017-09-01 16:02:46 +01:00
Brad King
900f75868c Merge topic 'flang'
d8e03e9b FindOpenMP: Add Flang flag.
2f3a07a9 Flang: Add support for flang Fortran compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1141
2017-09-01 10:33:15 -04:00
Brad King
9a509099f7 Merge topic 'FindThreads-cross-compile-no-try_run'
d4e551a9 FindThreads: Drop try_run to improve cross-compiling support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1109
2017-09-01 10:21:23 -04:00
Tin Huynh
d8e03e9ba6 FindOpenMP: Add Flang flag. 2017-08-31 15:27:18 -04:00
Tin Huynh
2f3a07a981 Flang: Add support for flang Fortran compiler
flang is a Fortran compiler built on top of clang [1].  Because flang
shares a lot of commonalities with clang, the flang module piggybacks
off the clang module and overrides certain options.

Add flang to Fortran compiler auto find list.

Update flang preprocessor macros to differentiate from PGI.

Add Flang-FindBinUtils.

[1] https://github.com/flang-compiler/flang
2017-08-31 15:24:59 -04:00
Brad King
425bb1a66a Merge topic 'irsl-intel'
fd4406f3 IRSL: Add Intel compiler support
8444252f IRSL: Install VC++ OpenMP libraries only for MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pelle <pbregener@gmail.com>
Merge-request: !1121
2017-08-31 10:09:42 -04:00
Christian Pfeiffer
fd4406f33e IRSL: Add Intel compiler support
Fixes: #16891
Fixes: #9903
2017-08-30 19:24:59 +02:00
Steffen Dettmer
d4e551a90b FindThreads: Drop try_run to improve cross-compiling support
Use `try_compile` instead of `try_run`.  It is not clear why `try_run`
was ever needed, and it does not work during cross-compiling.

Update the check's source file to remove code associated with actually
running things.  Also remove the ancient `__CLASSIC_C__` code path and
use a simple `int main(void)` as in `Modules/CheckIncludeFile.c.in`.

Fixes: #16920
2017-08-30 11:15:26 -04:00
Brad King
0ea6aee890 Merge topic 'gettext-windows'
fb3a608f FindGettext: fix support for MS Windows gettext binaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1192
2017-08-30 10:42:31 -04:00
Tomasz Słodkowicz
cf78bf6812 FindwxWidgets: Add support for Windows XP compatible buils
Microsoft has dedicated toolset versions for XP compatible binaries
(v110 vs. v110_xp, v141 vs. v141_xp) and CMake doesn't find wxWidgets
compiled with _xp tools. This patch adds _xp to directories searched
for wxWin libraries.
2017-08-30 10:31:02 -04:00
Tomasz Słodkowicz
fb3a608f1a FindGettext: fix support for MS Windows gettext binaries
Sometimes it uses filename with .exe extension so try to match
filename with and without extension.
2017-08-30 10:29:38 -04:00