Commit Graph

10291 Commits

Author SHA1 Message Date
Brad King
bb9dc34800 Merge topic 'FindArmadillo-wrappers'
38c6dd7b19 FindArmadillo: Add support for non-wrapper case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4418
2020-03-09 09:13:40 -04:00
Kyle Edwards
87819db28d Merge branch 'backport-swift-ninja-multiconfig' into swift-ninja-multiconfig 2020-03-09 09:12:54 -04:00
Saleem Abdulrasool
65b3848de0 Swift: support Ninja Multi-Config
Enable support for multi-configuration builds using Ninja when building
Swift.
2020-03-09 09:11:22 -04:00
Raul Tambre
0703e5fb6f CUDA: Perform CUDA toolkit include directory detection only on nvcc
The code is specific to nvcc.
2020-03-08 18:58:56 +02:00
Ryan Birmingham
38c6dd7b19 FindArmadillo: Add support for non-wrapper case
Armadillo is typically built as a wrapper library, which is what this
find module has historically supported, but it does not have to be.
If not, then instead of armadillo itself, we need to link to some
combination of dependencies and not armadillo.
2020-03-06 11:29:21 -05:00
Brad King
995b122471 Merge topic 'FindPython-artifacts-scope'
e5b4c74238 FindPython: Add possibility to control scope of artifacts.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4426
2020-03-06 09:18:24 -05:00
Marc Chevrier
e5b4c74238 FindPython: Add possibility to control scope of artifacts.
Fixes: #20362
2020-03-05 16:44:48 +01:00
Brad King
fbe5caee8f Merge topic 'findx11-improvement'
77802aab97 FindX11: Find additional libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4101
2020-03-05 07:22:39 -05:00
Zsolt Parragi
77802aab97 FindX11: Find additional libraries
With this change, FindLibrary(X11) learns about the following libraries:

 * xcb
 * X11-xcb
 * xcb-icccm
 * xcb-xkb
 * xkbcommon
 * xkbcommon-X11
2020-03-04 16:55:32 +01:00
Brad King
5bf1081962 Merge topic 'FindOpenAL-updates'
a67f0a4ac7 FindOpenAL: Move user-relevant comments into public documentation
cf0ce977de FindOpenAL: Minor implementation cleanup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4414
2020-03-04 08:29:36 -05:00
Brad King
022a935f3a Merge topic 'msvc-librarian'
55196a1440 MSVC: Use 'lib' instead of 'link /lib' to create static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4409
2020-03-04 08:28:01 -05:00
Brad King
95b151af90 Merge topic 'FindPython-manage-SOABI-suffix'
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4420
2020-03-04 08:20:18 -05:00
Brad King
ab00435e79 Merge topic 'FindPython-manage-SOABI-suffix' into release-3.17
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4420
2020-03-04 08:20:17 -05:00
Brad King
71633304c4 Merge topic 'llvm-rc-defines-not-flags'
ee70c5de4d llvm-rc: Forward DEFINES instead of FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4419
2020-03-04 08:19:30 -05:00
Nguyễn Gia Phong
a67f0a4ac7 FindOpenAL: Move user-relevant comments into public documentation
In particular, the role of frameworks in the search order can
help users trying to use the ``OPENALDIR`` environment variable.

Fixes: #20334
2020-03-03 09:30:34 -05:00
Nguyễn Gia Phong
cf0ce977de FindOpenAL: Minor implementation cleanup
Use modern FPHSA signature.  Indent search paths.
2020-03-03 09:25:20 -05:00
Francisco Facioni
55196a1440 MSVC: Use 'lib' instead of 'link /lib' to create static libraries
`link.exe /lib` is an undocumented flag and it just calls `lib.exe`.
Also `link.exe` doesn't parse the `/lib` option correctly when in a
response file.
2020-03-03 08:31:13 -05:00
Thomas Bernard
ee70c5de4d llvm-rc: Forward DEFINES instead of FLAGS
Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for
llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) we pass the full target `<FLAGS>`
to the llvm-rc resource compiler, but we should pass only `<DEFINES>`.

Fixes: #20414
2020-03-03 08:12:25 -05:00
Marc Chevrier
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.
Fixes: #20408
2020-03-03 13:13:48 +01:00
Brad King
f32d41d295 Merge topic 'CheckTypeSize-ppc64'
a09d646b7c CheckTypeSize: Fix '..._CODE' result for ppc and ppc64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4413
2020-03-02 10:48:41 -05:00
Brad King
178a166ae1 Merge topic 'xl-fortran-module-dir-use'
92785ed746 Tests: Enable Fortran submodule tests on XL compilers
210b0b99a9 XL: Fix using Fortran modules from their output directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4405
2020-03-02 10:48:05 -05:00
Brad King
813b505c67 Merge topic 'CheckFortranSource-def'
1bc521416f CheckFortranSource*: Avoid passing -DVAR to linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4406
2020-03-02 10:47:11 -05:00
Brad King
a09d646b7c CheckTypeSize: Fix '..._CODE' result for ppc and ppc64
Check for ppc64 macros before plain ppc.  Consider both upper and lower
case variants because some compilers have only one of them.

Fixes: #20368
2020-02-28 13:57:31 -05:00
Brad King
fb377ab5ef Merge topic 'FortranCInterface-cross-compile'
8e2683cf6d FortranCInterface: Fix broken search for test exe when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4404
2020-02-28 11:36:10 -05:00
Brad King
e46f579637 Merge topic 'q_namespace_export'
426941c433 Autogen: Recognize the new Q_NAMESPACE_EXPORT macro in AUTOMOC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4398
2020-02-28 11:14:34 -05:00
Brad King
15ac1f671b Merge topic 'q_namespace_export' into release-3.17
426941c433 Autogen: Recognize the new Q_NAMESPACE_EXPORT macro in AUTOMOC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4398
2020-02-28 11:14:33 -05:00
Brad King
1bc521416f CheckFortranSource*: Avoid passing -DVAR to linker
The test project is compiled with a `-DVAR` compiler flag where `VAR` is
the result variable.  Tell `try_compile` to add the flag through
`add_definitions` instead of `CMAKE_Fortran_FLAGS` so that it is not
used for linking.  Otherwise some Fortran compilers (e.g. XL 15) do not
like the flag when used to drive linking.
2020-02-28 10:57:45 -05:00
Brad King
210b0b99a9 XL: Fix using Fortran modules from their output directory
The XL Fortran compiler's `-qmoddir=` flag sets the module output
directory but does not add the directory to the search path for using
modules.  This is inconsistent with other compilers like the GNU Fortran
compiler's `-J` flag that does both.  In order to make these consistent,
add the module output directory with a `-I` flag on the XL Fortran
compiler so that it will be searched when using modules too.

This fixes our `FortranModules` test's coverage of submodules on
Ninja + XL.  That test places module files in a subdirectory that with
Ninja is not the current working directory when the compiler runs.

Fixes: #20400
2020-02-28 10:37:11 -05:00
Brad King
8e2683cf6d FortranCInterface: Fix broken search for test exe when cross-compiling
Previously the `find_program` call we used to locate the test executable
but that can be broken by `CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`.  Instead
teach the test project to write a file with the location of the
executable it builds.  Load that file to get the exact location.

Fixes: #20390
2020-02-27 11:09:25 -05:00
Brad King
4e6b14c985 Merge branch 'backport-3.16-FindPython-cache-cleanup' into release-3.16
1dc524f2 FindPython: Do not cache computed result variables in CMake 3.16
602d1d82 FindPython: Mark non-public cache entries INTERNAL in CMake 3.16

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4399
2020-02-27 08:33:11 -05:00
Brad King
ac23cfdee7 Merge topic 'FindPython-cache-cleanup'
42c6a1bfee FindPython: Do not cache computed result variables
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4393
2020-02-27 08:31:46 -05:00
Brad King
b766d2ca77 Merge topic 'FindPython-cache-cleanup' into release-3.17
42c6a1bfee FindPython: Do not cache computed result variables
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4393
2020-02-27 08:31:45 -05:00
Marc Chevrier
1679a60a6e Merge topic 'FindSWIG-components'
e131d9f974 FindSWIG: Add COMPONENTS support for SWIG target languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4384
2020-02-27 04:53:02 -05:00
Seth R Johnson
e131d9f974 FindSWIG: Add COMPONENTS support for SWIG target languages
Newer versions of SWIG drop support for some target languages, and some
forks of SWIG (such as for Fortran and MATLAB) aren't supported by the
mainline version of SWIG.

Swig versions as old as 1.3.6 (circa 2001) and possibly older use the
same format for listing available wrappers "%-15s - Generate %s
wrappers", so component detection should be quite reliable.
2020-02-26 10:12:30 -05:00
Brad King
ab2d170c74 Merge topic 'CPackRPM-trans-scripts'
c0534c4a68 CPackRPM: Add PRE_/POST_TRANS scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4387
2020-02-26 08:52:09 -05:00
Marc Chevrier
1dc524f202 FindPython: Do not cache computed result variables in CMake 3.16
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally add the result
variables `Python*_LIBRARY_RELEASE` and `Python*_LIBRARY_DEBUG` to the
cache.  They are always computed from other results and so should not be
presented to users in cmake-gui and ccmake to edit.

Issue: #20362
2020-02-26 08:09:21 -05:00
Marc Chevrier
602d1d8201 FindPython: Mark non-public cache entries INTERNAL in CMake 3.16
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally expose cache
entries named `_Python...` to users in cmake-gui and ccmake.  Mark those
entries as `INTERNAL` to hide them.

Issue: #20362
2020-02-26 08:09:16 -05:00
Marc Chevrier
42c6a1bfee FindPython: Do not cache computed result variables
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally add the result
variables `Python*_LIBRARY_RELEASE` and `Python*_LIBRARY_DEBUG` to the
cache.  They are always computed from other results and so should not be
presented to users in cmake-gui and ccmake to edit.

Issue: #20362
2020-02-26 08:08:26 -05:00
Marc Chevrier
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally expose cache
entries named `_Python...` to users in cmake-gui and ccmake.  Mark those
entries as `INTERNAL` to hide them.

Issue: #20362
2020-02-26 08:08:03 -05:00
Richard
426941c433 Autogen: Recognize the new Q_NAMESPACE_EXPORT macro in AUTOMOC
Qt 5.14 introduced a new moc keyword `Q_NAMESPACE_EXPORT`.

Qt-Issue: https://bugreports.qt.io/browse/QTBUG-68014
2020-02-26 07:18:44 -05:00
Marc Chevrier
facadf6c30 Merge topic 'swig-fortran'
a1909e26ac UseSWIG: Enable SWIG Fortran target language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4380
2020-02-25 17:19:51 -05:00
Brad King
693a1d7fcb Merge topic 'GoogleTest-optimize'
dac201442d GoogleTest: Optimize gtest_discover_tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4371
2020-02-25 09:10:03 -05:00
Steffen Seckler
dac201442d GoogleTest: Optimize gtest_discover_tests
Prior to this, `gtest_discover_tests` could take multiple minutes if
many tests are present.  This behavior was caused by a repeated addition
to the variable `script` in the `add_command` function using:

    set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE)

This takes very long for large variables.

This commit flushes the contents of the variable to ${CTEST_FILE} after
a certain size of the variable is reached.

In addition:

- cmake_minimum_required(VERSION ${CMAKE_VERSION}) is set to allow usage
  of new policies.  In particular, CMP0053 speeds up variable expansion.
- No longer appends strings using set(), but instead uses string(APPEND).
- An additional buffer for the tests variable is set.
2020-02-25 09:03:56 -05:00
Brad King
c66dccb6a3 Merge topic 'FindOpenCL-cuda-paths'
9078101d75 FindOpenCL: Add more paths on 64-bit Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4336
2020-02-25 09:02:15 -05:00
Brad King
8a7c485d3f Merge topic 'FindCUDA-no-threads-target' into release-3.17
b9d67447c3 FindCUDA: Only depend on Threads::Threads on platforms that need it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4377
2020-02-25 08:58:17 -05:00
Brad King
4d339831b0 Merge topic 'FindCUDA-no-threads-target'
b9d67447c3 FindCUDA: Only depend on Threads::Threads on platforms that need it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4377
2020-02-25 08:58:17 -05:00
Brad King
2b615e6f5e Merge topic 'FindPkgConfig-scope'
c3e0d1ffe9 FindPkgConfig: set policies CMP0054 and CMP0057 to new

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4388
2020-02-25 08:55:50 -05:00
Brad King
3a6481670f Merge topic 'FindPkgConfig-scope' into release-3.17
c3e0d1ffe9 FindPkgConfig: set policies CMP0054 and CMP0057 to new

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4388
2020-02-25 08:55:49 -05:00
Brad King
1d338dcf46 Merge topic 'cuda-non-device-link' into release-3.17
7da2c8c543 Merge branch 'backport-cuda-non-device-link'
738f3f23aa Ninja: Do not use nvcc response files with non-nvcc tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4376
2020-02-25 08:54:45 -05:00
Brad King
64ed4f6f99 Merge topic 'cuda-non-device-link'
7da2c8c543 Merge branch 'backport-cuda-non-device-link'
738f3f23aa Ninja: Do not use nvcc response files with non-nvcc tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4376
2020-02-25 08:54:45 -05:00