Commit Graph

8457 Commits

Author SHA1 Message Date
Brad King
ea54a9c666 Merge branch 'backport-java-new-packaging' into java-new-packaging
Fix conflicts by combining the changes from both sides.
2018-04-25 09:19:35 -04:00
Marc Chevrier
5482f485b8 FindJava, FindJNI, UseJava: update for version 10 support
* new version format
* new registry layout on Windows

Fixes: #17938
2018-04-25 09:18:53 -04:00
Brad King
9df096633b Merge topic 'BLAS-no-target-in-libs'
7d756f37cc FindBLAS: do not write an imported target name into BLAS_LIBRARIES
946846aaf5 FindPkgConfig: do not unset unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2006
2018-04-25 08:58:39 -04:00
Brad King
8fd76452a4 Merge topic 'testbigendian-cache-check-fix'
7b1c5f9f05 TestBigEndian: Include CheckTypeSize outside macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1999
2018-04-25 08:53:01 -04:00
Brad King
92eae6b72d Merge topic 'cuda-no-cache-host-compiler'
bff4651f2e CUDA: Do not create CMAKE_CUDA_HOST_COMPILER cache entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2003
2018-04-25 08:51:03 -04:00
Rolf Eike Beer
7d756f37cc FindBLAS: do not write an imported target name into BLAS_LIBRARIES
Since commit v3.11.0-rc1~177^2 (FindBLAS: optionally query pkg-config
for a library, 2017-12-15) the `BLAS_LIBRARIES` result variable may
incorrectly contain the name of an imported target.  Instead store the
list of libraries in the variable.  Unfortunately pkg_check_modules does
not provide a way to get this so we need to use a (temporary) hack of
reading `INTERFACE_LINK_LIBRARIES` from the interface library target.

Fixes: #17934
2018-04-24 13:49:20 -04:00
Rolf Eike Beer
946846aaf5 FindPkgConfig: do not unset unused variable
_props is never used, it was a leftover from a development step.
2018-04-24 13:46:41 -04:00
Cristian Adam
7b1c5f9f05 TestBigEndian: Include CheckTypeSize outside macro
When using https://github.com/cristianadam/cmake-checks-cache I have
noticed that CheckTypeSize would in certain cases have an empty
`__check_type_size_dir` variable.  The errors would point to
`TestBigEndian`.  By moving `include(CheckTypeSize)` outside the macro,
the errors go away.

Including dependencies of a module when the module is first included is
simpler and cleaner anyway.
2018-04-24 11:18:43 -04:00
Brad King
1ec112c70d Merge topic 'FindPython-stabilization'
d02a9bacf6 FindPython: ensure correct architecture (i.e. 32/64bit) is used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1991
2018-04-24 11:04:10 -04:00
Brad King
2982bbaa4d Merge topic 'CUDA7'
1fb2812d5b CUDA: Add compiler detection for CUDA < 7.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1993
2018-04-24 11:03:23 -04:00
Brad King
c74b9618d5 Merge topic 'cpack-doc-defaults'
30c8c9f55d CPack: Add CPACK_PACKAGE_HOMEPAGE_URL setting
c9fa8f9442 CPack: Fix documented CPACK_PACKAGE_DESCRIPTION_SUMMARY default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1998
2018-04-24 11:02:28 -04:00
Brad King
6c942ec338 Merge topic 'FindMatlab/mcr-compatibility'
59fb9e89b2 FindMatlab: Matlab Runtime Compiler support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1970
2018-04-24 11:01:36 -04:00
Brad King
bff4651f2e CUDA: Do not create CMAKE_CUDA_HOST_COMPILER cache entry
Users can create it through an explicit command-line option if desired.

Initializing the variable as an empty cache entry can wipe out a normal
variable of the same name that may have been set by a toolchain file.
Since commit v3.8.0-rc1~261^2~11 (CUDA: Use the host compiler for
linking CUDA executables and shared libs, 2016-09-19) we save the value
of `CMAKE_CUDA_HOST_COMPILER` persistently in the compiler information
file as a normal variable.

Fixes: #17935
2018-04-24 10:09:36 -04:00
Henry Schreiner
1fb2812d5b CUDA: Add compiler detection for CUDA < 7.5
If the CUDA version macros are not defined, run `nvcc --version` and
extract the version from its output.

Fixes: #17920
2018-04-23 11:26:56 -04:00
Alex Turbov
30c8c9f55d CPack: Add CPACK_PACKAGE_HOMEPAGE_URL setting
Initialize it from `CMAKE_PROJECT_HOMEPAGE_URL`.
2018-04-23 11:08:21 -04:00
Alex Turbov
c9fa8f9442 CPack: Fix documented CPACK_PACKAGE_DESCRIPTION_SUMMARY default 2018-04-23 11:07:02 -04:00
Raffi Enficiaud
59fb9e89b2 FindMatlab: Matlab Runtime Compiler support
* Determining automatically the MCR version on OSX and Windows
* Distinguishing between MCR and Matlab
* Specific tests for the MCR
* mexext on windows does not work properly: the mexext is hardcoded
* Doc updates for the MCR

Fixes: #16487
2018-04-23 10:30:49 -04:00
Brad King
152c636130 Merge topic 'productbuild_missing_var_docs'
8e41d44b38 Help: Document missing variables for productbuild CPack generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !1995
2018-04-23 10:20:34 -04:00
Brad King
b0610e4c95 Merge topic 'cuda-arch-repair'
61b222f3ae CUDA/select_compute_arch: Fix detection on old CUDA with new card/driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1987
2018-04-23 10:19:27 -04:00
Craig Scott
8e41d44b38 Help: Document missing variables for productbuild CPack generator
Missing variables were CPACK_PREFLIGHT_<COMP>_SCRIPT
and CPACK_POSTFLIGHT_<COMP>_SCRIPT.
2018-04-21 12:49:19 +10:00
Henry Schreiner
61b222f3ae CUDA/select_compute_arch: Fix detection on old CUDA with new card/driver
Fix version comparisons to handle patch components.  List and check
known archs for each version of CUDA so mismatching versions are not
suggested.

Fixes: #17921
2018-04-20 09:43:50 -04:00
Marc Chevrier
d02a9bacf6 FindPython: ensure correct architecture (i.e. 32/64bit) is used 2018-04-20 14:30:32 +02:00
Brad King
3fa423bbc1 Merge topic 'FindPython-debian-cross-comp'
7855e4d6b7 FindPython: Add cross-compilation support for Debian-based systems.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Marc Chevrier <marc.chevrier@sap.com>
Merge-request: !1961
2018-04-20 07:48:29 -04:00
Brad King
c14497191b Merge topic 'FindJPEG-imported-targets'
87f2cf3b1c FindJPEG: Add imported target support and full test
13952a3b7f FindJPEG: Add multi config support and associated docs
1f6649b7d1 FindJPEG: Add version detection and associated test update and docs
8d07408a62 FindJPEG: Cleanup documentation formatting
e70da3f0f3 FindJPEG: Clean up whitepaces and lowercase function names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1974
2018-04-19 08:26:34 -04:00
Brad King
423de692f9 Merge topic 'InstallRequiredSystemLibraries-mfcm'
bdf660cab5 InstallRequiredSystemLibraries: Check for existence of mfcm dlls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1980
2018-04-19 08:24:40 -04:00
Brad King
c4a2059eae Merge topic 'depfile-flag'
d67962c55a SunPro,XL: Add depfile flags to support Ninja generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1969
2018-04-19 08:23:52 -04:00
Brad King
3c6388553a Merge topic 'CheckIncludeFile-required-libs'
a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES
391a5837ee cmake_policy: Add undocumented PARENT_SCOPE option to GET
3c47ac5b25 OpenWatcom: Add workaround for lack of error on missing library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1978
2018-04-19 08:23:08 -04:00
Brad King
541b53375d Merge topic '17870-effective-system-name'
4597396784 Apple: Use include_guard() within compiler config
e95b3fd9bb Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler info
84f9f63fcc Modules: Introduce CMAKE_EFFECTIVE_SYSTEM_NAME to lookup compiler info
9fa0f2eb56 CMakeFindPackageMode: Perform platform-specific initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1964
2018-04-19 08:20:15 -04:00
Yee Fan
7855e4d6b7 FindPython: Add cross-compilation support for Debian-based systems.
Debian-based Linux distributions locate their architecture-specific
pythonX.Y-config tool at /usr/bin/<arch>-python<X.Y>-config.

We first attempt to find and use the architecture-specific
pythonX.Y-config tool. If the pythonX.Y-config tools are absent, then we
proceed to find the architecture-specific Python libraries.

Fixes: #17912
2018-04-19 02:53:46 +08:00
Christof Krüger
bdf660cab5 InstallRequiredSystemLibraries: Check for existence of mfcm dlls
Previously, only existence of `mfc${v}.dll` and `mfc${v}d.dll` variants
was checked and it was assumed that the managed variants `mfcm*.dll`
also existed.  This assumption doesn't hold with Visual Studio 2017.
Check each file separately.

Fixes: #17913
2018-04-18 09:18:57 -04:00
Mateusz Loskot
87f2cf3b1c FindJPEG: Add imported target support and full test 2018-04-18 08:59:06 -04:00
Brad King
48b5daaf7c Merge topic 'android-ndk-r17'
da294a039d Android: Add support for NDK r17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1976
2018-04-18 08:30:00 -04:00
Brad King
a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES
Other check modules honor this variable, so include file checks should
too.  Add policy `CMP0075` to enable the behavior in a compatible way.

This change was originally made by commit v3.11.0-rc1~108^2
(CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it
was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor
CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could
affect checks in existing projects in an incompatible way.

Fixes: #9514
2018-04-18 08:09:56 -04:00
Gregor Jasny
4597396784 Apple: Use include_guard() within compiler config 2018-04-18 07:41:44 -04:00
Gregor Jasny
e95b3fd9bb Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler info
Apple platforms macOS, iOS, tvOS, and watchOS can all share the same
compiler information.  Rename `Darwin-*` modules to `Apple-*` and load
them all through `CMAKE_EFFECTIVE_SYSTEM_NAME`.  This saves duplication
of 4 * 21 compiler information modules.

Issue: #17870
2018-04-18 07:41:42 -04:00
Gregor Jasny
84f9f63fcc Modules: Introduce CMAKE_EFFECTIVE_SYSTEM_NAME to lookup compiler info
Create a `CMAKE_EFFECTIVE_SYSTEM_NAME` variable to use for looking
up compiler information modules instead of using `CMAKE_SYSTEM_NAME`
directly.  This will allow multiple platforms to share the same set
of compiler information modules without spelling out all of them.

Issue: #17870
2018-04-18 07:41:25 -04:00
Christian Pfeiffer
9260dedfd2 Merge topic 'fix-findmpi-lib-regex'
bab4bc5f32 FindMPI: Fix libname regex to not match the compiler executable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1952
2018-04-18 07:33:07 -04:00
Brad King
9fa0f2eb56 CMakeFindPackageMode: Perform platform-specific initialization
Since commit v3.1.0-rc1~565^2~3 (Add platform-specific initialization
step when enabling languages, 2014-04-29) the main enable-language logic
includes the `CMakeSystemSpecificInitialize` module to perform
platform-specific initialization based on `CMAKE_SYSTEM_NAME`.  This
should be done during `cmake --find-package` mode too.
2018-04-18 07:31:35 -04:00
Mateusz Loskot
13952a3b7f FindJPEG: Add multi config support and associated docs 2018-04-17 23:26:44 +02:00
Craig Scott
6774e9cabf Merge topic 'FindOpenSSL-components'
912a6c1cb5 FindOpenSSL: Add component support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1929
2018-04-17 17:23:47 -04:00
Mateusz Loskot
1f6649b7d1 FindJPEG: Add version detection and associated test update and docs 2018-04-17 22:53:26 +02:00
Mateusz Loskot
8d07408a62 FindJPEG: Cleanup documentation formatting 2018-04-17 22:48:36 +02:00
Mateusz Loskot
e70da3f0f3 FindJPEG: Clean up whitepaces and lowercase function names 2018-04-17 21:43:07 +02:00
Ephi Sinowitz
d67962c55a SunPro,XL: Add depfile flags to support Ninja generator
Add CMAKE_DEPFILE_FLAGS_${lang} to SunPro and XL. These flags are used
by the Ninja generator.
2018-04-17 15:35:49 -04:00
Brad King
da294a039d Android: Add support for NDK r17
The `armeabi` ABI is no longer available, so we can no longer use it by
default unconditionally.  Instead detect all available ABIs and choose
the oldest arm ABI that is available.

Also update the test suite to account for the lack of `armeabi` support
and pass as of Android NDK r17-beta2.
2018-04-17 11:21:15 -04:00
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