Commit Graph

9539 Commits

Author SHA1 Message Date
Brad King
d1f38ba65d CMakeDetermineCompilerId: Consider UTF-16 encodings of INFO strings
Our compiler identification source encodes `INFO:compiler[...]` and
similar strings in compiled objects or binaries that we then extract to
get information about the compiler.  With most compilers the strings are
encoded in the binaries as a simple byte sequence.  However, some
compilers use other encodings.  For example, the MS CSharp compiler uses
UTF-16LE and a TI compiler uses UTF-16BE.  Try each encoding.

Fixes: #19459
2019-07-11 09:50:30 -04:00
Brad King
c30939a713 Merge topic 'CheckSymbolExists-doc'
bf2244681b CheckSymbolExists: Add examples for check_symbol_exists
cafaa5883a CheckCXXSymbolExists: Clarify documented role

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3522
2019-07-11 08:51:22 -04:00
Kyle Edwards
bb4b394fac Merge topic 'fix/move-more-cpack-internals'
98617f1be0 Refactor: Move CPack internal files to `Internal/CPack/` directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3530
2019-07-10 12:48:12 -04:00
Hong Xu
bf2244681b CheckSymbolExists: Add examples for check_symbol_exists
Add examples in `CheckCXXSymbolExists` too.

Co-Author: Brad King <brad.king@kitware.com>
2019-07-10 09:51:38 -04:00
Brad King
cafaa5883a CheckCXXSymbolExists: Clarify documented role 2019-07-10 09:51:38 -04:00
Brad King
4fc10431f0 Merge topic 'elseif'
f4ed56ab63 Fix elseif() in place of else()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !3515
2019-07-10 09:26:39 -04:00
Brad King
96a35a8eed Merge topic 'implicit-includes-cray-hlist'
0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist'
98e371f13e Cray: Fix include parsing when the -hlist= flag is present

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3532
2019-07-10 09:21:24 -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
45030c5a24 Merge topic 'iar-riscv'
c242187875 IAR: Add support for the RISC-V compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3510
2019-07-09 09:35:01 -04:00
Alex Turbov
98617f1be0 Refactor: Move CPack internal files to Internal/CPack/ directory
Some commits ago all CPack internal `*.cmake` files have been moved
to `Internal/CPack/`. This commit also move some templates
internally used by generators to the same location to make
`Modules/` directory less noisy w/ files the end users don't
need to use/see.
2019-07-09 15:45:03 +03:00
Stefan Andersson
c242187875 IAR: Add support for the RISC-V compiler 2019-07-08 13:11:45 -04:00
Brad King
58d10debe1 Merge topic 'fortran-submodule-cray'
b0bcd4d7d2 Fortran: Add support for submodules on Cray
33de4d27eb Fortran: Support compilers using no module prefix on submodule files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3504
2019-07-08 11:43:39 -04:00
Brad King
a6a698aafb Merge topic 'pb-cxx11'
59a30f2acf FindProtobuf: libprotoc also needs C++11
194adaf985 Tests: require C++11 for some protobuf tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3503
2019-07-08 11:28:27 -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
bf7f5d0a22 Merge topic 'threads-are-good'
08cd7f6a02 Swift: support multithreaded compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3506
2019-07-08 11:26:29 -04:00
Rolf Eike Beer
59a30f2acf FindProtobuf: libprotoc also needs C++11 2019-07-03 18:49:49 +02:00
Brad King
c723ff216f Merge topic 'FindPostgreSQL-lib-dir'
d21b890a4c FindPostgreSQL: Fix regression in computation of library directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3505
2019-07-03 07:31:10 -04:00
Artalus
f4ed56ab63 Fix elseif() in place of else() 2019-07-03 11:57:53 +03:00
Saleem Abdulrasool
08cd7f6a02 Swift: support multithreaded compilation
Query the number of logical CPUs available to enable parallel
compilation for Swift.
2019-07-02 10:45:07 -07:00
Brad King
8a42cd155f Merge topic 'static'
8aa0b63bc6 Swift: add rules for static linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3492
2019-07-02 08:45:58 -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
Marc Chevrier
554c2ed743 Merge topic 'FindMPI-AddSuffixes'
5affe415a3 FindMPI: Add MPI_EXECUTABLE_SUFFIX to every item in lists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3496
2019-07-02 04:39:19 -04:00
Brad King
ecee33c3ae Merge topic 'override-rules-RC'
d2f20ab217 RC: Honor CMAKE_USER_MAKE_RULES_OVERRIDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3489
2019-07-01 09:54:19 -04:00
Brad King
dd433c98e4 Merge topic 'FindMatlab-EXCLUDE_FROM_ALL'
11e0009b77 FindMatlab: EXCLUDE_FROM_ALL parameter to matlab_add_mex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3474
2019-07-01 09:52:44 -04:00
Brian Carlson
5affe415a3 FindMPI: Add MPI_EXECUTABLE_SUFFIX to every item in lists
Add the `${MPI_EXECUTABLE_SUFFIX}` to each of the items in the
`_MPI_${id}_${LANG}_COMPILER_NAMES` and `_MPI_${LANG}_GENERIC_COMPILER_NAMES` rather
than just adding the suffix to the last item in each list.
2019-06-29 13:35:01 -04:00
Saleem Abdulrasool
8aa0b63bc6 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-06-27 21:28:48 -07:00
Brad King
d2f20ab217 RC: Honor CMAKE_USER_MAKE_RULES_OVERRIDE
Since the refactoring in commit 48f7e2d300 (Unhardcode the
CMAKE_CONFIGURATION_TYPES values, 2017-11-27, v3.11.0-rc1~130^2~1),
`CMAKE_BUILD_TYPE` is initialized while enabling the RC language.
Therefore we need to honor `CMAKE_USER_MAKE_RULES_OVERRIDE`
as part of enabling RC so that a `CMAKE_BUILD_TYPE_INIT` setting
in the override file is honored.

Fixes: #19401
2019-06-27 07:39:24 -04:00
Brad King
6ddc0b4438 Merge topic 'cuda-msvc-runtime-library'
8fbd25772f CUDA: Implement MSVC runtime library abstraction
07807a2006 VS: Use AddLanguageFlags to de-duplicate CMAKE_{CUDA,ASM*}_FLAGS lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3485
2019-06-27 07:30:01 -04:00
Raffi Enficiaud
11e0009b77 FindMatlab: EXCLUDE_FROM_ALL parameter to matlab_add_mex
Enabling a mex target to be excluded from the `all` target.
2019-06-26 19:53:02 +02: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
Brad King
1e263065e1 Merge topic 'findmpi_use_interface_link_options'
39c572c9c9 FindMPI: Updated to use INTERFACE_LINK_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3476
2019-06-26 07:12:24 -04:00
Brad King
c92f5f6a73 Merge topic 'FindMatlab/issue-19279-mex-compilation-error-on-attribute'
c2595a4958 FindMatlab: removing spaces in compiler define

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3473
2019-06-26 07:11:34 -04:00
Rolf Eike Beer
e28240ea1f FindProtobuf: C++11 support is required since version 3.6.0 2019-06-25 15:22:01 +02:00
Raffi Enficiaud
c2595a4958 FindMatlab: removing spaces in compiler define
Spaces in `DLL_EXPORT_SYM=__attribute__ ((visibility (\"default\")))`
are causing a compilation error.

Fixes: #19279
2019-06-25 07:24:01 -04:00
Brad King
1009fd1860 Merge topic 'matlab-if'
56e89e50d3 FindMatlab: simplify several if()-constructs
51bcdeb17f Tests: simplify checks for Matlab variables being set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3472
2019-06-25 07:15:33 -04:00
Brad King
92351fe7cd Merge topic 'find_matlab_exact'
2454fe84f5 FindMatlab: Support EXACT versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raffi Enficiaud <raffi.enficiaud@free.fr>
Merge-request: !3460
2019-06-25 07:07:29 -04:00
Robert Maynard
39c572c9c9 FindMPI: Updated to use INTERFACE_LINK_OPTIONS 2019-06-24 16:45:44 -04:00
Rolf Eike Beer
56e89e50d3 FindMatlab: simplify several if()-constructs 2019-06-24 18:33:48 +02:00
Marc Chevrier
9201908ca5 FindPython: add Python_FIND_ABI hint.
This variable will enable to specify will ABIs will be searched.
2019-06-24 12:00:21 +02:00
Stefan Lietzau
2454fe84f5 FindMatlab: Support EXACT versions
If an exact version is requested, don't pick the latest matlab version but the one matching
the requested version.

Fixes: #19155
2019-06-24 09:27:39 +02:00
Brad King
cecf7e61c4 Merge topic 'BundleUtilities-cleanup'
8d59ebb704 GetPrerequisites: use CMAKE_OBJDUMP if it is set
e33f4cb0cb BundleUtilities: use if(... IN_LIST ...)
6695383dd5 BundleUtilities: remove needless variable expansions in if() arguments
d5333c0923 BundleUtilities: simplify inclusion of GetPrerequisites

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3447
2019-06-20 11:43:51 -04:00
Brad King
5773f12d84 Merge topic 'android-pie-cmp0083'
9e99a95c7d Android: ensure PIE behavior is consistent regardless CMP0083 policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3459
2019-06-19 08:22:17 -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
Brad King
89e80933d6 Merge topic 'FindMPI-imported-link-flags'
f7eaa342de FindMPI: Store imported target link flags as a list instead of a string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3449
2019-06-19 07:26:04 -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
a5d4457083 Merge topic 'FindCUDA-more-libs'
421be81413 FindCUDA: Add nvToolsExt and OpenCL libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3456
2019-06-19 07:22:50 -04:00
Brad King
7c7c8a01c5 Merge topic 'FindBoost-component'
830b332f32 FindBoost: Add tests for legacy variables
0dd6772a89 FindBoost: Add legacy variables and targets for compatibility
e4181eeaf2 FindBoost: Don't overwrite Boost_${_comp}_FOUND
4cb652e1d3 Tests.RunCMake.FindBoost: Fix example BoostConfig
7251d54bd1 Tests.FindBoost: Don't use BoostConfig in MODULE test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3438
2019-06-19 07:21:02 -04:00