Commit Graph

8512 Commits

Author SHA1 Message Date
Brad King
5836c60daa Merge topic 'FindOpenAL-std-includes'
3d9d1c9dcf FindOpenAL: Find AL/al.h or OpenAL/al.h in standard include paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1963
2018-04-17 07:32:53 -04:00
Brad King
6ff8e34e5e Merge topic 'FindOpenMP-Intel-Windows'
0c7433e874 FindOpenMP: Fix support for Intel on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1957
2018-04-17 07:29:33 -04:00
Brad King
8c546287dd Merge topic 'implicit-lib-gcceh-file'
eb0498357f Exclude "libgcc_eh" library files from implicit link libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1967
2018-04-17 07:19:22 -04:00
Brad King
054c849112 Merge branch 'FindOpenMP-Intel-Windows' into release-3.11
Merge-request: !1957
2018-04-16 14:12:46 -04:00
Roland Schulz
0c7433e874 FindOpenMP: Fix support for Intel on Windows
The change in commit v3.11.0-rc1~334^2 (FindOpenMP: Use NO_DEFAULT_PATH
where appropriate, 2017-11-15) broke partial support for Intel on Windows.
Since `OpenMP_${LANG}_IMPLICIT_LINK_DIRS` is empty for this compiler
the `find_library` call without `NO_DEFAULT_PATH` worked accidentally
in environments with the needed libraries in the search path already.

Fix support for Intel on Windows by simply removing our explicit search
for the `libiomp5md` library.  In cases that it is needed, the compiler
already inserts metadata in `.obj` files to tell the MSVC linker to use
the library.

Suggested-by: Christian Pfeiffer <cpfeiffer@live.de>
Fixes: #17910
2018-04-16 14:11:12 -04:00
Brad King
90cdd06f4c Merge branch 'implicit-lib-gcceh-file' into release-3.11
Merge-request: !1967
2018-04-16 11:58:30 -04:00
Brad King
eb0498357f Exclude "libgcc_eh" library files from implicit link libraries
Extend the fix in commit v3.9.6~1^2 (Restore exclusion of "gcc_eh" from
implicit link libraries, 2017-11-07) to also exclude `gcc_eh` libraries
referenced by absolute path to the library file.

Issue: #17436
2018-04-16 11:56:23 -04:00
James Jones
3d9d1c9dcf FindOpenAL: Find AL/al.h or OpenAL/al.h in standard include paths
Add `AL` and `OpenAL` to the `PATH_SUFFIXES` so that they are searched
within the standard system include directories.

We already have `include/AL`, `include/OpenAL`, and `include` to help
out within the locations specified by `PATHS`, though it is unclear why
it was done this way instead of adding the suffixes to all the `PATHS`
explicitly.
2018-04-16 11:24:22 -04:00
Brad King
ccd17a557c Merge topic 'cuda-compiler-loaded'
595aa12811 CUDA: Set CMAKE_CUDA_COMPILER_LOADED variable when language is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1955
2018-04-16 09:15:01 -04:00
Harry Mallon
912a6c1cb5 FindOpenSSL: Add component support 2018-04-16 12:38:39 +01:00
Henry Schreiner
595aa12811 CUDA: Set CMAKE_CUDA_COMPILER_LOADED variable when language is enabled
We already do this for C, CXX, Fortran, etc.
2018-04-13 13:04:33 -04:00
Brad King
77705a2c28 Merge topic 'clang-cl-std'
3f82c5904d Clang: Add standard flags support when simulating MSVC
8381bc12ad Clang: Avoid extra C++ feature detection when simulating MSVC
6cddf7ba32 Clang: Refactor standard flags logic when simulating MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1906
2018-04-13 10:22:26 -04:00
Chuck Atkins
bab4bc5f32 FindMPI: Fix libname regex to not match the compiler executable
When trying to match full path libraries on the mpicc link line, the
current regex is not strict enough and improperly matches a partial path
to the Xcode compiler path with homebrew mpich.  This adjusts the regex
to look for a space preceeding the library name to prevent the first
argument, i.e. the compiler invocation, from being matched, and require
either a space or end-pattern after the library to prevent mismatches with
arguments that contain the library suffix but don't actually end with it.
2018-04-12 15:07:16 -04:00
Brad King
d59cd3b131 Merge topic 'features-msvc-2017'
5f4272cc06 Features: Record for VS 2017 through 15.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1903
2018-04-12 11:31:42 -04:00
Brad King
b148d3ade0 Merge topic 'FindMatlab-handle-exception'
ffb1f19191 FindMatlab: add unit tests
44c916b4c8 FindMatlab: always handle uncaught exception

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1946
2018-04-12 11:28:31 -04:00
Brad King
f2376a5622 Merge topic 'FindwxWidgets-local-var'
9174786008 FindwxWidgets: Use more private name for local variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1951
2018-04-12 11:27:36 -04:00
Brad King
580822fa67 Merge topic 'FindImageMagick-FixForMultipleInstalls'
68d1fc89ed FindImageMagick: Find components in same locations as main package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1917
2018-04-12 11:26:43 -04:00
Ruben Van Boxem
3f82c5904d Clang: Add standard flags support when simulating MSVC
When Clang 3.9 simulates MSVC 19.0 or higher it knows the `-std:` flags
that such versions of MSVC defines.

Fixes: #17866
2018-04-11 14:50:22 -04:00
Brad King
8381bc12ad Clang: Avoid extra C++ feature detection when simulating MSVC
Apply the optimization from commit v3.10.0-rc1~131^2 (MSVC: Avoid
unnecessary C++ feature detection steps, 2017-09-11) to the case of
Clang simulating a version of MSVC that does not define standards.

Issue: #17274
2018-04-11 14:47:28 -04:00
Brad King
6cddf7ba32 Clang: Refactor standard flags logic when simulating MSVC
Consolidate the compile options and standard defaults branches.
Add comments.
2018-04-11 14:45:16 -04:00
Roman Wüger
68d1fc89ed FindImageMagick: Find components in same locations as main package
Fix component include/library path if multiple versions are installed.
When searching for individual components, look only in the locations
we expect to find them that we already computed.
2018-04-11 11:32:09 -04:00
Brad King
61607fffbb Merge branch 'features-msvc-2017' into release-3.11
Merge-request: !1903
2018-04-11 11:30:02 -04:00
Daniel Filipe
5f4272cc06 Features: Record for VS 2017 through 15.6
VS 15.3 has more features than we recorded in commit v3.7.0-rc1~156^2~2
(Features: Record features for VS 15 Preview 4, 2016-09-05).

While at it, update comments and simplify some cases.
2018-04-11 11:27:07 -04:00
Andrea Ranieri
9174786008 FindwxWidgets: Use more private name for local variable
Avoid using a `_filename` variable that may be set by project code.
Also unset the variable name that we do use to avoid conflict.
2018-04-11 10:41:10 -04:00
Marc Chevrier
963837cf17 UseSWIG: fix erroneous generator expressions
Add note regarding multi-config generators
2018-04-10 11:28:32 +02:00
Clemens Buchacher
44c916b4c8 FindMatlab: always handle uncaught exception
If runtests('$unittest_file') throws an exception it is ignored. It is
easy to produce such an exception by passing a nonexistent file as
UNITTEST_FILE.

We already handle exceptions if the option NO_UNITTEST_FRAMEWORK is set.
Use the same method to handle exceptions thrown by runtests or by a
custom_Matlab_test_command.

Fixes #16660.
2018-04-09 21:42:18 +02:00
Brad King
847ae3882e Merge topic 'FindCUDA-nvcc-clcache-support'
2da3698447 FindCUDA: Add support for clcache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1933
2018-04-09 11:19:44 -04:00
Edward Z. Yang
2da3698447 FindCUDA: Add support for clcache
When `CMAKE_C_COMPILER` is `clcache`, pass plain `cl` as the host
compiler to `nvcc`.  Otherwise, `nvcc` does not accept it.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
2018-04-06 11:21:34 -04:00
Brad King
d7af8a34b6 Merge topic 'findwxwidgets-msys-library-dirs'
44ad8e48de FindwxWidgets: Fix wxWidgets_LIBRARY_DIRS on Cygwin/MSYS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1930
2018-04-05 13:28:19 -04:00
Brad King
308d21b225 Merge topic 'msvc-toolset-version-variable'
45bf6f6246 Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic
304f493e57 MSVC: Add MSVC_TOOLSET_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1882
2018-04-05 13:26:49 -04:00
Brad King
d1660bd2cb Merge topic 'revert-CheckIncludeFile-required-libs'
35109e718b Revert "CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1931
2018-04-05 13:23:34 -04:00
Arkady Shapkin
45bf6f6246 Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic 2018-04-04 13:21:16 -04:00
Arkady Shapkin
304f493e57 MSVC: Add MSVC_TOOLSET_VERSION variable
Provide the MSVC toolset version number based on the compiler version.

Fixes: #16923
2018-04-04 13:21:09 -04:00
Brad King
35109e718b Revert "CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES"
This reverts commit v3.11.0-rc1~108^2 (CheckIncludeFiles: Honor
CMAKE_REQUIRED_LIBRARIES, 2017-12-24).  The behavior change can
affect checks in existing projects that don't expect the behavior.
Introducing the behavior again will require a policy.

Fixes: #17874
Issue: #9514
2018-04-04 13:14:01 -04:00
ARATA Mizuki
44ad8e48de FindwxWidgets: Fix wxWidgets_LIBRARY_DIRS on Cygwin/MSYS
The check for `wxWidgets_LIBRARIES` variable, introduced by e8b77084, fails
with the `wx-config` script generated by an MSYS build, because
`wxWidgets_LIBRARY_DIRS` is in POSIX style.

This commit fixes the problem with `wxWidgets_LIBRARY_DIRS` by converting it to
Windows style.  The actual code were copied from bf643286, which does the same
thing for `wxWidgets_INCLUDE_DIRS`.
2018-04-05 01:37:57 +09:00
Brad King
6425ceb46c Merge topic 'wcdh-bare-features'
f38d050231 WCDH: introduce BARE_FEATURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1869
2018-04-04 11:16:50 -04:00
Brad King
8496d11ef8 Merge topic 'android-no-libstdc++'
843d55de29 Android: Suppress implicit -lstdc++ linker flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1919
2018-04-04 11:14:36 -04:00
Brad King
640bc9def4 Merge topic 'cuda_support_system_libraries_with_device_symbols'
41eab150a8 CUDA: Pass more link libraries to device linking
88c7abb740 CUDA: Pass host linker directories to device linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1634
2018-04-04 11:12:52 -04:00
Brad King
124472e9fc Merge topic 'FindPython-stabilization'
b1fd2bbe75 FindPython: enhance multiple major versions lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1915
2018-04-04 11:06:02 -04:00
Craig Scott
74005a136c Merge topic 'UseSWIG-add-new-behavior'
8ab4e38373 UseSWIG: Add new behavior for better support files management
438429d6fe UseSWIG: Rework tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1891
2018-04-04 10:24:07 -04:00
Rolf Eike Beer
f38d050231 WCDH: introduce BARE_FEATURES
This allows defining compat versions of some C/C++ features with the name of the
keyword itself, so all code can look as if it was written for the new language
standard.
2018-04-03 20:56:28 +02:00
Brad King
843d55de29 Android: Suppress implicit -lstdc++ linker flag
The chosen STL libraries are already linked explicitly so we shouldn't
let the compiler add its implicit `-lstdc++` (the default) when invoking
the linker.

Fixes: #17863
NDK-Issue: https://github.com/android-ndk/ndk/issues/105
Inspired-by: Tom Hughes <tomtheengineer@gmail.com>
2018-04-03 14:34:57 -04:00
Brad King
561238bb6f Merge topic 'FPHSA-include'
d6883801cd Find*: always include FPHSA shipped with CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1910
2018-04-03 09:38:41 -04:00
Brad King
a01caf81a6 Merge topic 'FindDCMTK-includes'
5c948aa50d FindDCMTK: use CheckIncludeFiles instead of open coding it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1911
2018-04-03 09:38:09 -04:00
Brad King
cad7385ab6 Merge topic 'android-clang-std-flags'
12e6796b62 Android: Do not pass non-existent Clang -std flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1913
2018-04-03 09:36:37 -04:00
Marc Chevrier
8ab4e38373 UseSWIG: Add new behavior for better support files management
fixes: #17840
2018-04-03 12:44:55 +02:00
Marc Chevrier
b1fd2bbe75 FindPython: enhance multiple major versions lookup 2018-04-03 09:41:19 +02:00
Brad King
12e6796b62 Android: Do not pass non-existent Clang -std flags
Android NDK r16b comes with

  Android clang version 5.0.300080  (based on LLVM 5.0.300080)

Although it claims version 5, it does not support the `-std=c++17`
or `-std=c++2a` flags that upstream Clang does.

Android NDK r17-beta1 comes with

  Android (4639204 based on r316199) clang version 6.0.1

that does have the flags.
2018-04-02 15:15:20 -04:00
Rolf Eike Beer
5c948aa50d FindDCMTK: use CheckIncludeFiles instead of open coding it
While at it remove a needless status message.
2018-04-02 17:59:45 +02:00
Brad King
445d6781e6 Fortran: Add support for .fpp extensions
Compilers such as `gfortran` recognize `.fpp` extensions to mean a
Fortran source on which the preprocessor should run.

Fixes: #17869
2018-04-02 11:07:55 -04:00