Commit Graph

9501 Commits

Author SHA1 Message Date
Brad King 693a9b382a Merge branch 'FindMPI-link-flags' into release-3.15
Merge-request: !3605
2019-07-25 13:09:25 -04:00
Robert Maynard cf04da7e70 FindMPI: make sure computed link flags are not de-duplicated
In commit f7eaa342de (FindMPI: Store imported target link flags as a
list instead of a string, 2019-06-14, v3.15.0-rc2~2^2) we used
`separate_arguments` to parse the extracted link flags and add them to
`INTERFACE_LINK_LIBRARIES`.  That property is not meant for link flags
and CMake may de-duplicate them.  This is particularly problematic for
flags like `-Wl,-rpath -Wl,/path1 -Wl,-rpath -Wl,/path2`.

In commit 39c572c9c9 (FindMPI: Updated to use INTERFACE_LINK_OPTIONS,
2019-06-24) we moved the parsed flags over to `INTERFACE_LINK_OPTIONS`,
but that may still perform de-duplication.  Avoid the parsing and
de-duplication of flags by passing the original string via `SHELL:`
instead.

Fixes: #19516
2019-07-25 12:59:21 -04:00
Brad King 420073e536 Merge branch 'backport-clang-gnulike-support' into release-3.15
Merge-request: !3592
2019-07-24 08:12:51 -04:00
Brad King d50b31be35 Clang: For MSVC ABI do not use modes older than C++14
Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode,
2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that
targets the MSVC ABI.  However, Clang cannot compile with the MSVC
standard library unless it runs in a mode aware of C++14 (since MSVC
itself does not even have a lower mode).  When `CMAKE_CXX_STANDARD` is
set to 98 or 11, use C++14 anyway.

Since Clang's default mode is aware of C++14, another option is to not
add any flags for 98 or 11.  However, if a future Clang version ever
defaults to a higher C++ standard, setting the standard to 98 or 11
should at least not use a mode higher than 14.

Also revert test updates from commit 4819ff9647 (Tests: fix failures
with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that
were meant to work around the standard selection problem.

Fixes: #19496
2019-07-24 07:40:30 -04:00
Brad King 4cac01c63a Merge branch 'InstallRequiredSystemLibraries-redist' into release-3.15
Merge-request: !3585
2019-07-22 10:20:06 -04:00
James Butler 13c3ec545b IRSL: Fix discovery of VS 2019 v141 toolset redistributables
Since VS 2019, the v141 toolset redistributables can be found in
either the VS 2019 or VS 2017 install directory. Update the logic
to search multiple versions of VS.

Fixes: #19488
2019-07-22 10:06:45 -04:00
James Butler 0484165da0 IRSL: Fix typo in v143 toolset version check
Fix the toolset v143 check from commit 33ee779330 (IRSL: Fix discovery
of VS 2019 v142 toolset redistributables, 2019-04-03, v3.14.2~6^2) to
check the correct variable.
2019-07-22 10:06:44 -04:00
Brad King 1a2d260634 Merge branch 'backport-swift-improvements' into release-3.15
Merge-request: !3568
2019-07-18 07:47:05 -04:00
Marc Chevrier 696d0f9caf FindPython: ensure interpreter is founded when cross-compiling
Fixes: #19473
2019-07-18 07:13:20 -04:00
Saleem Abdulrasool 5803a8a2f7 Swift: support SONAME on ELFish targets
We should enable the soname to be setup for ELF shared libraries.
Failure to do so generates binaries with incorrect names which prevents
loading.
2019-07-17 20:46:25 -07:00
Saleem Abdulrasool 47e28cbe1f Swift: support multithreaded compilation
Query the number of logical CPUs available to enable parallel
compilation for Swift.
2019-07-17 20:46:08 -07:00
Saleem Abdulrasool 6814567e8c Swift: add rules for static linking
The Swift driver recently learnt how to generate static libraries using
the `-static` flag.  This enables us to generate proper static libraries
with dependency tracking with Swift as well.
2019-07-17 20:45:54 -07:00
Saleem Abdulrasool be0d404208 Support per-language library link flags
This changes the behaviour of the generators to use a per-language
library search path flag.  This is needed for multi-language projects
with different compilers (e.g. cl + gfortran).  Since the adjusted
variable has been part of the user settings, we control this based on a
policy.

Fixes: #19307
2019-07-17 20:44:58 -07:00
Brad King 7242d81269 Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.15
Merge-request: !3549
2019-07-12 16:21:26 -04:00
Brian Carlson f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths
Now that the working directory is in the build tree, relative input
paths must be converted to an absolute path to remain relative to the
source directory.

Fixes: #19472
2019-07-12 16:20:08 -04:00
Brad King 14f69fab54 Merge branch 'fortran-submodule-cray' into release-3.15
Merge-request: !3504
2019-07-11 13:01:02 -04:00
Brad King 98844aaa6f Merge branch 'implicit-includes-cray-hlist' into release-3.15
Merge-request: !3532
2019-07-10 08:57:55 -04:00
Brad King 0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist' 2019-07-09 13:13:26 -04:00
Chuck Atkins 98e371f13e Cray: Fix include parsing when the -hlist= flag is present
Update parsing logic from commit 5990ecb741 (Compute implicit include
directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2)
to handle the quoting behavior caused by the `-hlist=` flag.
2019-07-09 13:12:52 -04:00
Brad King dd1257e2de Merge branch 'iar-riscv' into release-3.15
Merge-request: !3510
2019-07-09 09:34:42 -04:00
Stefan Andersson c242187875 IAR: Add support for the RISC-V compiler 2019-07-08 13:11:45 -04:00
Willem Deconinck b0bcd4d7d2 Fortran: Add support for submodules on Cray
Define `CMAKE_Fortran_SUBMODULE_{SEP,EXT}` for the Cray Fortran
compiler.  Use an empty separator to tell CMake that this compiler does
not use the enclosing module name as a prefix on submodule files.

Issue: #18925
2019-07-08 11:28:27 -04:00
Brad King d21b890a4c FindPostgreSQL: Fix regression in computation of library directory
Since commit 368bcba28a (FindPostgreSQL: Find debug lib, imported
configs, 2019-05-09, v3.15.0-rc1~93^2) the `PostgreSQL_LIBRARY` variable
may contain a list and therefore should not be passed to the
`get_filename_component` command directly.  Instead spell out the logic
to compute `PostgreSQL_LIBRARY_DIR` from one of the per-configuration
variables.

Fixes: #19444
2019-07-02 07:32:14 -04:00
Brad King 8fbd25772f CUDA: Implement MSVC runtime library abstraction
In commit fb3370b6a1 (MSVC: Add abstraction for runtime library
selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags
for CUDA on Windows, where nvcc uses MSVC as the host compiler.  Add
them now and update the MSVCRuntimeLibrary test to cover CUDA.

Fixes: #19428
2019-06-26 08:36:48 -04:00
Robert Maynard 39c572c9c9 FindMPI: Updated to use INTERFACE_LINK_OPTIONS 2019-06-24 16:45:44 -04:00
Brad King 00ad0b9d12 Merge branch 'android-pie-cmp0083' into release-3.15
Merge-request: !3459
2019-06-19 08:20:35 -04:00
Marc Chevrier 9e99a95c7d Android: ensure PIE behavior is consistent regardless CMP0083 policy
In commit c4b4d8b3a6 (POSITION_INDEPENDENT_CODE: Manage link flags for
executables, 2018-10-02, v3.14.0-rc1~395^2) we accidentally removed our
Android-specific logic for PIE under the CMP0083 OLD behavior.  Restore
it and also implement Android-specific logic for CMP0083 NEW behavior.

Fixes: #19393
2019-06-19 08:12:45 -04:00
Brad King 1ca4be5d90 Merge branch 'FindMPI-imported-link-flags' into release-3.15
Merge-request: !3449
2019-06-19 07:26:22 -04:00
Robert Maynard f7eaa342de FindMPI: Store imported target link flags as a list instead of a string
We already use the `separate_arguments` `NATIVE_COMMAND` mode to parse
command-line strings into lists in several other places.

Fixes: #18897
2019-06-19 07:25:05 -04:00
Brad King 65fc109dc6 Merge branch 'FindBoost-component' into release-3.15
Merge-request: !3438
2019-06-18 08:37:52 -04:00
Alexander Grund 0dd6772a89 FindBoost: Add legacy variables and targets for compatibility
This allows future BoostConfig to NOT define those and users relying on
them use the newer FindBoost of newer CMake versions
2019-06-18 08:28:38 -04:00
Alexander Grund e4181eeaf2 FindBoost: Don't overwrite Boost_${_comp}_FOUND
Is set in Boost >= 1.71 so don't overwrite it
2019-06-18 08:25:14 -04:00
Brad King dad271e8b7 Merge branch 'FindBLAS-OpenBLAS-thread' into release-3.15
Merge-request: !3434
2019-06-17 08:03:29 -04:00
Alexander Neumann 276b56f01c FindBLAS: Add second try for OpenBLAS with thread libraries.
Issue: #16221
2019-06-17 08:03:07 -04:00
Brad King 069e42f7c3 Merge branch 'CheckCXXSymbolExists-xref' into release-3.15
Merge-request: !3437
2019-06-12 11:50:33 -04:00
Rolf Eike Beer f26c3d5c60 CheckCXXSymbolExists: reference to CheckCXXSourceCompiles instead of C version 2019-06-12 11:48:56 -04:00
Brad King 501a3cf195 Merge branch 'cpack-nuget-case' into release-3.15
Merge-request: !3427
2019-06-05 09:58:41 -04:00
Mathieu Malaterre 8a4732c60e CPack/NuGet: Find nuget tool on case sensitive file system
There is no need to use a CamelCase executable name since it will be
handled gracefully on Windows anyway.  This change allow support for
Linux system, in particular Debian distribution where the binary is
called `nuget`.
2019-06-05 09:32:22 -04:00
Craig Scott 15de26c7f3 Help: Trivial typo and grammar fixes for FindEnvModules 2019-06-05 20:55:18 +10:00
Ben Boeckel 0da2c35d6b GetPrerequisites: fix regression in gp_append_unique
The `item` variable was the loop variable in the old code prior to
commit 3dfc8b9bd6 (GetPrerequisites: use if(IN_LIST) instead of foreach,
2019-05-09).  The function argument `value` should be used instead.
2019-06-04 12:00:06 -04:00
Brad King 36140d864e Merge topic 'ninja-nvcc-rsp'
d91b5a72cd Ninja: Add support for CUDA nvcc response files
5efac09bed Ninja: Compute linker response file flag earlier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3399
2019-06-04 08:35:47 -04:00
Brad King d4108f5585 Merge topic 'check_language_respects_cuda_host_compiler'
fada8cbfd6 CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3407
2019-06-04 08:30:26 -04:00
Francisco Facioni d91b5a72cd Ninja: Add support for CUDA nvcc response files 2019-06-03 11:53:27 -04:00
Robert Maynard fada8cbfd6 CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation
Fixes: #19013
2019-06-03 10:36:06 -04:00
Marc Chevrier 52b298bd03 FindPython: ensure Python_ROOT_DIR is always searched first 2019-05-31 19:05:04 +02:00
Brad King 720253393c Merge topic 'ninja-cmcldeps'
fd28e24947 Windows-MSVC.cmake: fix disabling of CMAKE_NINJA_CMCLDEPS_RC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3404
2019-05-31 09:10:51 -04:00
Brad King d8e90be04d Merge topic 'FindPython-remove-erroneous-code'
4a871d51a3 FindPython*: remove erroneous code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3400
2019-05-31 09:08:40 -04:00
Marc-André Moreau fd28e24947 Windows-MSVC.cmake: fix disabling of CMAKE_NINJA_CMCLDEPS_RC 2019-05-30 13:11:34 -04:00
Brad King 7a8a24d028 Merge topic 'FindBoost-debug-messages'
35bfc85d95 FindBoost: Refactor debug messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3382
2019-05-30 10:41:14 -04:00
Marc Chevrier 4a871d51a3 FindPython*: remove erroneous code 2019-05-30 13:40:46 +02:00