Commit Graph

8586 Commits

Author SHA1 Message Date
Brad King
3dd926f4a8 Merge branch 'FindMatlab-no-CMAKE_CL_64' into release-3.12
Merge-request: !2354
2018-09-05 15:20:03 -04:00
Raffi Enficiaud
bfe883af60 FindMatlab: Remove erroneous duplicate code
This was left accidentally when resolving merge conflicts between
previous changes.

Fixes: #18221
2018-09-05 15:19:50 -04:00
Brad King
6be7097dbe Merge branch 'FindBoost-old-context' into release-3.12
Merge-request: !2348
2018-09-04 12:43:12 -04:00
Igor Kostenko
9a800c12fc FindBoost: Fix context discovery for 1.60 and below
* `all.hpp` was removed in 1.68:
  2e37599461
* `fcontext.hpp` was moved to detail in 1.61:
  c2f0dfdf26

Fixes: #18126
2018-09-04 12:41:36 -04:00
Brad King
80bb9214dd Merge branch 'CheckIPOSupported-output-backslashes' into release-3.12
Merge-request: !2331
2018-08-30 11:53:40 -04:00
Brad King
4e1ea02bb8 CheckIPOSupported: Tolerate backslashes in output of failed checks
Avoid passing the output of our `try_compile` through a macro argument.
Macro invocations re-parse their arguments and so should not be given
arbitrary content that may contain backslashes and such.

Instead pass a simple message.  This is also more readable in the case
that the macro generates a message itself.  After the macro returns,
report the real output directly to the variable named by our caller.
Also record the output in a log file as other checks do on failure.

Fixes: #18244
2018-08-30 11:46:19 -04:00
Brad King
b7dbb25a0a CheckIPOSupported: Simplify result reporting logic
Simplify the test for whether a `RESULT` argument was given to the
`check_ipo_supported` call.  Also do not set an empty variable name
if `OUTPUT` was not given.
2018-08-30 11:45:13 -04:00
Brad King
0e764082fe Merge branch 'android-ndk-r18' into release-3.12
Merge-request: !2319
2018-08-28 09:44:03 -04:00
Brad King
ca97d4cb5f Android: Add support for NDK r18
NDK r18 drops GCC toolchains and some STL types.  We need to choose a
clang toolchain by default when no gcc toolchains are available.  Switch
the STL type default to `c++_static` when the old `gnustl_static`
default is not available.

Update the test suite to not run tests for STL types that do not exist.
Also do not expect the gcc toolchain `cpp` tool to be available because
r18 does not provide it.  Also teach it to tolerate `gcc -dumpmachine`
output like `arm--linux-android` that differs from the toolchain prefix.

Fixes: #18301
2018-08-28 09:27:26 -04:00
Brad King
d515112906 Merge branch 'FindCUDA-deprecate-cublas_device' into release-3.12
Merge-request: !2298
2018-08-23 14:51:47 -04:00
Kenta Kubo
bdf1f36135 FindCUDA: Do not find cublas_device on CUDA >= 9.2
The `cublas_device` has been deprecated and will be removed in
future versions of CUDA.

Issue: #18290
2018-08-23 14:49:46 -04:00
Robert Maynard
122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs
Use `curand_static` to identify directories containing device libraries
because `cublas_device` is deprecated and will be removed in the future.

Issue: #18290
2018-08-23 14:43:31 -04:00
Brad King
c7769867d6 Merge branch 'cuda-arch-version' into release-3.12
Merge-request: !2251
2018-08-01 13:47:56 -04:00
Brad King
37ba34c0b0 FindCUDA/select_compute_arch: Restore two-component CUDA_VERSION
Since commit v3.12.0-rc1~332^2 (FindCUDA/select_compute_arch: Add
support for CUDA as a language, 2018-03-15) this module sets
`CUDA_VERSION` based on `CMAKE_CUDA_COMPILER_VERSION` when the language
is enabled.  Limit it to two components for consistency with the
normal `FindCUDA` documentation and behavior.

Fixes: #18231
2018-08-01 13:42:13 -04:00
Marc Chevrier
2f88c177d0 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS
Fixes: #18226
2018-07-31 19:33:35 +02:00
Craig Scott
2af5307317 Merge branch 'cpack-default-package-version-zero' into release-3.12
Merge-request: !2239
2018-07-29 19:44:24 +10:00
Brad King
ed015bde2b CPack: Restore support for 0-valued version components
In commit v3.12.0-rc1~136^2 (CPack: Use project version as default for
`CPACK_PACKAGE_VERSION`, 2018-04-29) we did not account for the value of
`CMAKE_PROJECT_VERSION_{MAJOR,MINOR,PATCH}` having `0`.  Fix the logic
to distinguish between unprovided version components and `0` components.

While at it, add a test case covering the behavior described in the
documentation by the original commit.  The number of version components
in the package name should match those provided to the `project()`
command `VERSION` option.

Fixes: #18199
2018-07-27 10:01:29 -04:00
Craig Scott
7ddc2a110c GoogleTest: Ensure policy settings allow use of IN_LIST
If policy settings at the time the GoogleTest module is included are
such that CMP0057 is unset or set to OLD, the use of IN_LIST with
if() will lead to an error. Therefore, explicitly specify the policy
settings for the whole file to ensure the function implementations
have access to the required CMake features.

Fixes: #18198
2018-07-25 21:30:51 +10:00
Brad King
b5061e02f8 Merge branch 'FindPython-fix-multiple-calls' into release-3.12
Merge-request: !2228
2018-07-23 11:08:40 -04:00
Marc Chevrier
50921cc04e FindPython*: fix erroneous behavior on multiple 'find_package' calls
Fixes: #18192
2018-07-23 11:08:16 -04:00
Brad King
8cefa2cba4 Merge branch 'tcl-8.7' into release-3.12
Merge-request: !2223
2018-07-18 13:10:12 -04:00
Dima Panov
bec3be11b9 FindTCL: Add support for version 8.7
Fixes: #18186
2018-07-18 13:08:34 -04:00
Brad King
ed289e0577 UseSWIG: Use CSharp language only if it is enabled
In commit v3.12.0-rc1~2^2 (UseSWIG: Add CSHARP variant for wrapper
files, 2018-06-08) we explicitly marked swig-generated `.cs` files as
`LANGUAGE` CSharp so that the resulting sources can be compiled.
However, this works only when the CSharp language has been enabled.

Fixes: #18184
2018-07-18 08:53:32 -04:00
Brad King
c3ea50ede1 CSharp: Set CMAKE_CSharp_COMPILER_LOADED variable when language is enabled
We already do this for C, CXX, Fortran, etc.
2018-07-18 08:53:32 -04:00
Brad King
e109dc0b2a Merge branch 'intel-std-fix' into release-3.12
Merge-request: !2206
2018-07-12 09:36:30 -04:00
Christian Pfeiffer
735e69f445 Intel: Fix incorrectly documented extension flags
Fixes: #18166
2018-07-12 09:35:50 -04:00
Brad King
384c3f9e9e Merge branch 'boost-1.68-beta1' into release-3.12
Merge-request: !2204
2018-07-12 09:10:02 -04:00
Roger Leigh
b76b93c728 FindBoost: Change context header used
boost/context/all.hpp is removed in Boost 1.68.
boost/context/detail/fcontext.hpp is present in all Boost
releases containing context (≥1.61).
2018-07-11 23:14:21 +01:00
Cristian Adam
e014df762b QNX: Fix autogen compiler predefines detection
In commit v3.12.0-rc1~20^2 (Move GNU COMPILER_PREDEFINES_COMMAND from
Platform to Compiler, 2018-06-01), `Compiler/GNU.cmake` introduced the
`-dM` flag, which requires `-Wp` prefix for the QNX compiler wrapper.
2018-07-11 09:54:49 -04:00
Roger Leigh
c8a7835ea9 FindBoost: Add support for Boost 1.68 beta1
This includes a new component, `Boost::contract`.

Fixes: #18167
2018-07-11 07:26:51 -04:00
Brad King
890be0145d Merge branch 'FindLua-CMP0012' into release-3.12
Merge-request: !2189
2018-07-03 12:54:24 -04:00
Marc Chevrier
38ffcedd26 UseSWIG: reintroduce legacy target name management
Fixes: #18140
2018-07-03 12:46:59 -04:00
Adriaan de Groot
91f4adb028 FindLua: Set CMP0012 to NEW for the revised search code
Code added by commit v3.12.0-rc1~53^2 (FindLua: Search for lua.h using
more conventional paths, 2018-05-20) depends on `CMP0012` NEW behavior.
Set the policy explicitly for the scope of the FindLua module.

Fixes: #18142
2018-07-03 11:23:22 -04:00
Brad King
d43c9152a6 Merge branch 'FindOpenMP-avoid-warning-in-check' into release-3.12
Merge-request: !2176
2018-06-27 15:27:21 -04:00
Brad King
826bf5c454 FindOpenMP: Avoid warning in check code
The test code added by commit v3.12.0-rc1~411^2~1 (FindOpenMP: Verify in
test source that OMP library is linked, 2018-03-01) leaves an unused
variable warning.  This breaks the check with `-Werror`.  Remove the
variable and leave just the function call, which should still check that
the OMP library is linked.

Fixes: #18102
2018-06-27 15:24:22 -04:00
Brad King
5dc9f440c5 Merge branch 'FindJPEG-fix-debug' into release-3.12
Merge-request: !2159
2018-06-21 10:50:48 -04:00
Andrey Karpov
ae4a548302 FindJPEG: Drop ancient compatibility NATIVE_JPEG_* result variables
These have been deprecated since 2002!
2018-06-21 10:47:03 -04:00
Andrey Karpov
7876f329a9 FindJPEG: Add forgotten names of libraries for Debug configuration
The change in commit v3.12.0-rc1~202^2~1 (FindJPEG: Add multi config
support and associated docs, 2018-04-17) accidentally left out the
default jpeg library names from consideration for debug variants.
2018-06-21 10:47:03 -04:00
Brad King
a044006a32 Merge branch 'xcode-10-archs' into release-3.12
Merge-request: !2153
2018-06-19 09:24:37 -04:00
Brad King
1e356734a7 FindCURL: Rename imported target to match upstream CURL
Upstream CURL provides imported target `CURL::libcurl`.  Rename the
target added by `FindCURL` to match.  We don't need compatibility with
the old name because it has never been in a CMake release (except a 3.12
release candidate).

Suggested-by: Jakub Zakrzewski <slither.jz@gmail.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Fixes: #18091
2018-06-18 13:58:21 -04:00
Brad King
bc5bcad45e Xcode: Detect architecture(s) using ARCHS instead of CURRENT_ARCH
Xcode 10 no longer populates `CURRENT_ARCH` with the current
architecture in shell scripts and instead uses `undefined_arch`.
Instead we must use `ARCHS`.  It lists all architectures separated by
spaces.

Fixes: #18085
2018-06-18 13:44:43 -04:00
Brad King
93fe9fc1a2 Merge branch 'UseSWIG-csharp-variant' into release-3.12
Merge-request: !2137
2018-06-13 10:51:49 -04:00
Rishi Theivendran
0c2fb4c896 UseSWIG: Add CSHARP variant for wrapper files
Issue: #18065
Fixes: #18066
2018-06-12 11:34:58 -04:00
Brad King
f024f4f8a0 Merge branch 'UseSWIG-fix-genex' into release-3.12
Merge-request: !2143
2018-06-12 10:08:36 -04:00
Marc Chevrier
88dd5dc9ff UseSWIG: add support for generator expressions 2018-06-12 10:07:24 -04:00
Brad King
3dd046a84b Merge branch 'UseSWIG-handle-SWIG_MODULE_NAME' into release-3.12
Merge-request: !2145
2018-06-12 10:00:41 -04:00
Felix Schwitzer
156138d5f1 UseSWIG: Fix handling of SWIG_MODULE_NAME source file property
Fix a typo from commit 0bef9eb410 (UseSWIG: modernize module,
2018-01-29) that caused `UseSWIG` to ignore an eventually set property
`SWIG_MODLUE_NAME`.

Building multiple python modules using the mentioned property as
described in the docs could lead to an invalid, or even worse,
inconsistent `build.ninja` file.  The reason is that the generated list
of support files was not unique.  For each module the support file was
always named the same, namely `path/to/builddir/MODULENAME.py`.
2018-06-12 09:55:53 -04:00
Brad King
1f3221f365 Merge branch 'FindPython-3.8' into release-3.12
Merge-request: !2140
2018-06-08 09:42:29 -04:00
Marcel Plch
b6e7f2c37f FindPython: Add support for version 3.8
Python 3.7 is about to be released, making the development version 3.8.
2018-06-08 09:42:18 -04:00
Ruslan Baratov
aeda8fcceb Help: Package without components should use 'check_required_components' too
Macro 'check_required_components' should be called even if there are no
components provided by package.  This will make sure error is reported
in next cases:

    find_package(Foo CONFIG REQUIRED oops) # 'oops' treated as component
    find_package(Foo CONFIG REQUIRED COMPONENTS foo) # no components expected
2018-06-07 10:41:45 -04:00