Commit Graph

9253 Commits

Author SHA1 Message Date
Brad King
d1c2f8787c Merge topic 'FindPython-handle-virtual-env'
8a2f62cc18 FindPython*: Add capability to control virtual env handling.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3173
2019-04-04 11:28:49 -04:00
Brad King
058217669f Merge topic 'find-dependency-fix-17583'
37da6af17d find_dependency: Always search dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3161
2019-04-03 14:05:57 -04:00
Marc Chevrier
8a2f62cc18 FindPython*: Add capability to control virtual env handling.
Fixes: #19097
2019-04-03 09:16:17 +02:00
Brad King
81985b7c6c Merge topic 'nasm-fix'
9e4de543d0 Modules: Check nasm compile object variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3167
2019-04-02 14:17:57 -04:00
Brad King
afa2614eea Merge topic 'memorize_c_compilers_with_full_standard_support'
983533a4b8 Record when C compilers have gained full support for 90,99,11
f92ccbc306 CompileFeatures: memoize C compilers with full language level support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3146
2019-04-01 10:41:49 -04:00
Connor Davis
9e4de543d0 Modules: Check nasm compile object variable
Check if the CMAKE_ASM_NASM_COMPILE_OBJECT variable is set
before modifying it. Only modify if not previously set.
2019-03-29 21:57:28 -06:00
Damien R
37da6af17d find_dependency: Always search dependencies
When a dependency was already found, find_dependency did not search it
again. While this works in basic case, it does not when there are
components as the check does not take components into account.

Given the fact that there is no documentation about this optimization and
that the correct implementation is not trivial as it would require
changes in find_package to have the list of components already found we
always search dependencies.

Fix #17583.
2019-03-29 22:03:21 +01:00
Brad King
c690e11a56 Merge topic 'implicit-includes'
dad86f1873 ParseImplicitIncludeInfo: Canonicalize implicit include dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michel Zou <xantares09@hotmail.com>
Merge-request: !3157
2019-03-29 09:11:41 -04:00
Brad King
ce0e402934 Merge topic 'ifw_group_option_parsing'
6f6e0966a7 CPackIFW: Add missing cpack_ifw_configure_component_group option processing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3160
2019-03-29 09:10:22 -04:00
Brad King
dad86f1873 ParseImplicitIncludeInfo: Canonicalize implicit include dirs
The implicit include directory extraction added by commit 5990ecb741
(Compute implicit include directories from compiler output, 2018-12-07,
v3.14.0-rc1~108^2) leaves paths like `/usr/lib/../include` unchanged.
Fix the logic to canonicalize such paths (e.g. to `/usr/include`)
as we do for implicit link directories already.  This is important
to ensure the set of implicit directories is represented in the same
form as the include directories that will be compared to them.

Issue: #19095
2019-03-29 08:48:56 -04:00
Clément Rezvoy
6f6e0966a7 CPackIFW: Add missing cpack_ifw_configure_component_group option processing
Both commit 88ecfd8ba1 (CPackIFW: Add some options, 2016-11-11,
v3.8.0-rc1~248^2) and commit e5089c562c (CPackIFW: Add some options,
2017-01-24, v3.8.0-rc1~53^2) added some options to this macro's
documentation and implementation, but the actual processing of the
parsed options was never added.  Add it now.

Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2019-03-28 14:59:08 -04:00
Robert Maynard
983533a4b8 Record when C compilers have gained full support for 90,99,11 2019-03-27 15:45:11 -04:00
Robert Maynard
f92ccbc306 CompileFeatures: memoize C compilers with full language level support
Previously compilers that had full support for a language
standard level was forced to verify this every time a new build
directory was created. Now we record this information and insert
the correct granular compile features instead of doing a try_compile.
2019-03-27 15:45:11 -04:00
Brad King
c03ee3ca71 Merge topic 'FindFontconfig-var-case'
a3a1e69f8a FindFontconfig: Convert module variables to camel case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3153
2019-03-27 14:11:08 -04:00
Brad King
c126e80b5a Merge topic 'cuda-bracket-output'
b127e0c561 CUDA: Tolerate square brackets in PROMPT environment variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3151
2019-03-27 13:59:26 -04:00
Brad King
3843d0550b Merge topic 'find_dependency-cleanup'
82dec5191c find_dependency: Remove clearing of unused cmake_fd_exact_arg variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3149
2019-03-27 13:58:38 -04:00
Brad King
a3a1e69f8a FindFontconfig: Convert module variables to camel case
Our documented standard for find module variable names is to match the
case of the find module package name.  This was overlooked when the
module was added by commit 84e7920b3a (FindFontconfig: Add module to
find Fontconfig, 2018-09-27, v3.14.0-rc1~523^2).

The module was released with the upper case names in CMake 3.14.0, so
fix it to have camel case names in 3.14.1.  This is incompatible but
anyone using a given release series should be using the latest patch on
it and we've made breaking fixups on newly released features like this
before.

Reported-by: Christophe Giboudeaux <christophe@krop.fr>
Fixes: #19094
2019-03-26 14:14:09 -04:00
Damien R
82dec5191c find_dependency: Remove clearing of unused cmake_fd_exact_arg variable
The variable is unused since commit ab358d6a85 (Improve find_dependency
argument handling, 2017-05-22, v3.9.0-rc1~57^2) where handling of EXACT
keyword in find_dependency was reworked.
2019-03-26 11:56:02 -04:00
Brad King
8494bc2713 Merge topic 'toolchain-include_directories'
588fa1bb9e Restore support for include_directories() in toolchain files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3140
2019-03-26 10:56:34 -04:00
Brad King
b127e0c561 CUDA: Tolerate square brackets in PROMPT environment variable
The `PROMPT` environment variable affects nvcc's output.  Fix
our parsing of that output to tolerate square brackets.

Fixes: #19089
2019-03-26 10:43:51 -04:00
Brad King
28ef639d2b Merge topic 'pkg-get-variable-prefix-path'
f401a57160 pkg_get_variable now sets PKG_CONFIG_PATH like pkg_check_modules
4d76941924 FindPkgConfig: hoist PKG_CONFIG_PATH ops out into _pkg_set_path_internal
78f23de70c More tests for pkg_get_variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3131
2019-03-25 11:51:29 -04:00
Brad King
588fa1bb9e Restore support for include_directories() in toolchain files
Any `include_directories()` calls in toolchain files are used during our
ABI detection step even though it does not include any system headers.
Since commit 5990ecb741 (Compute implicit include directories from
compiler output, 2018-12-07, v3.14.0-rc1~108^2), that check is also used
to detect implicit include directories.  Any `include_directories()` in
a toolchain file are detected as implicit and later excluded from
explicit specification on compiler command lines, thus breaking the
purpose of the calls in the first place.

Fix the implicit include directory detection step to avoid using paths
from `include_directories()` calls in the toolchain file.

Fixes: #19079
2019-03-25 11:48:17 -04:00
Brad King
89abbdd8c8 Merge topic 'ghs-linux'
2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator
0404efe786 GHS: Add support for GHS Multi Generator in Linux
2060a1445c Tests: Fix file name case in GHS object library test
ddad70c8a4 Tests: Run GHS tests in a separate ctest process
f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3006
2019-03-22 09:22:44 -04:00
Naren Manimohan
2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator 2019-03-21 12:57:44 -04:00
Naren Manimohan
0404efe786 GHS: Add support for GHS Multi Generator in Linux 2019-03-21 12:57:40 -04:00
Brad King
e09c606eb4 Merge topic 'dont_do_compiler_feature_checks_for_version_with_no_features'
85415afbdc CompileFeatures: Don't try_compile for language levels with no features
616282a5ce CMake: Provide language level compile features lists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3128
2019-03-21 10:03:10 -04:00
Brad King
b54517bf75 Merge topic 'Find-prefix-paths'
eea9eda834 remove some platform specific search paths from Find modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3122
2019-03-21 09:45:50 -04:00
Brad King
12cf0a8e48 Merge topic 'armcc-compiler-id'
8f8d056051 ARMCC: Fix identification of ARM compiler when it defines GNU macros

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3127
2019-03-21 09:40:09 -04:00
Dan Kegel
f401a57160 pkg_get_variable now sets PKG_CONFIG_PATH like pkg_check_modules
Fixes: #15805
2019-03-20 17:21:47 -04:00
Dan Kegel
4d76941924 FindPkgConfig: hoist PKG_CONFIG_PATH ops out into _pkg_set_path_internal 2019-03-20 17:20:30 -04:00
Robert Maynard
85415afbdc CompileFeatures: Don't try_compile for language levels with no features
Previously Compilers always had to run a try_compile to determine what
language level each feature mapped to. Now we can skip the try_compile
when a language level has no features.
2019-03-20 09:10:10 -07:00
Brad King
8f8d056051 ARMCC: Fix identification of ARM compiler when it defines GNU macros
According to ARMCC 5.06 documentation:

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359125007083.html

the compiler may define `__GNUC__` in addition to `__ARMCC_VERSION`.
Re-order our preprocessor checks to consider the ARM-specific macro
first so that the ARM compiler is not mistaken for a GNU compiler.

Fixes: #19065
2019-03-20 11:20:39 -04:00
Rolf Eike Beer
eea9eda834 remove some platform specific search paths from Find modules
These are added through CMAKE_SYSTEM_PREFIX_PATH on the platforms automatically.
2019-03-19 23:49:11 +01:00
Bartosz Kosiorek
8f723e48b8 ExternalProject: Optimize Mercurial commands 2019-03-19 15:17:55 +01:00
Bartosz Kosiorek
bca0c16223 ExternalProject: Optimize git commands 2019-03-19 15:17:35 +01:00
Brad King
6bbc82b4b3 Merge topic 'CheckTypeSize-decl-warning'
0adb0e0178 CheckTypeSize: Fix with clang '-Werror,-Wmissing-variable-declarations'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3112
2019-03-19 08:57:51 -04:00
Brad King
51a1a7e64f Merge topic 'FindBLAS-mklroot'
90b7758489 FindBLAS: respect MKLROOT and MKL_ROOT if available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3108
2019-03-19 08:56:37 -04:00
Brad King
146b959491 Merge topic 'environment-modules'
dfea916d3c FindEnvModules: Provide a CMake interface to environment modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3076
2019-03-19 08:53:35 -04:00
Brad King
a9a4f3b193 Merge topic 'cray-bad-compiler-option'
c213e34d0c cray: Detect bad options passed on the command line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3110
2019-03-19 08:52:11 -04:00
Campbell Barton
0adb0e0178 CheckTypeSize: Fix with clang '-Werror,-Wmissing-variable-declarations'
Resolve issue building with missing variable declarations, error:

```
/src/cmake_clang/CMakeFiles/CheckTypeSize/CMAKE_SIZEOF_UNSIGNED_LONG.c:24:6: error: no previous extern declaration for non-static variable 'info_size' [-Werror,-Wmissing-variable-declarations]
char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
     ^
1 error generated.
```
2019-03-18 11:56:39 -04:00
Chuck Atkins
dfea916d3c FindEnvModules: Provide a CMake interface to environment modules 2019-03-18 11:47:35 -04:00
Brad King
f6cbb02b59 Merge topic 'ExternalProject-optimize-git'
c58f5e116e ExternalProject: Extend documentation about GIT_TAG usage
8355665f8d ExternalProject: Drop unnecessary 'git submodule init'
00b5f1a1b5 ExternalProject: Simplify generated 'git clone' scripts
98e6822fdf ExternalProject: Re-run 'git clone' when GIT_REMOTE_NAME changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3095
2019-03-18 11:27:59 -04:00
Brad King
23874e4078 Merge topic 'FindGLEW-updates'
a77a30e657 FindGLEW: Add test
a7d853868b FindGLEW: Update implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3094
2019-03-18 11:26:49 -04:00
Marc Chevrier
0bd2e3aa57 Merge topic 'pkg-config-linker-flags'
b759fa9b8e FindPkgConfig: Set linker flags on imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3082
2019-03-16 06:14:00 -04:00
Mario Emmenlauer
90b7758489 FindBLAS: respect MKLROOT and MKL_ROOT if available
Fixes: #19052
2019-03-15 20:13:35 +01:00
Chuck Atkins
c213e34d0c cray: Detect bad options passed on the command line 2019-03-15 11:38:19 -04:00
Claudio Fantacci
a7d853868b FindGLEW: Update implementation
Replicate behaviour of upstream GLEW.

* define the imported target GLEW::glew for the shared library GLEW

* if GLEW_USE_STATIC_LIBS is defined and set to TRUE, this module instead
  defines the imported target GLEW::glew_s for the static library GLEW

* an imported target GLEW::GLEW is created as a copy of either GLEW::glew
  or GLEW::glew_s

* by setting GLEW_VERBOSE you print out the log of the module.

Fixes: #17638, #17864, #18989
2019-03-15 11:22:29 -04:00
Bartosz Kosiorek
c58f5e116e ExternalProject: Extend documentation about GIT_TAG usage
When GIT_SHALLOW is used, the '--depth 1 --no-single-branch'
arguments are add. It means that only branch names and tags
is downloaded to repository. Most Commit Hash is not working.
With this commit the documentation was updated, to describe
the limitation of GIT_SHALLOW.
2019-03-15 11:00:31 -04:00
Brad King
f739654ddf Merge topic 'FindPython-ensure-correct-architecture-selected'
9a84cb1663 FindPython*: ensure correct architecture is selected.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3103
2019-03-15 10:20:28 -04:00
Marc Chevrier
9a84cb1663 FindPython*: ensure correct architecture is selected.
Ensure interpreter and libraries architecture matches CMake build
configuration.
Update documentation about interpreter constraints.

Fixes: #19024
2019-03-14 18:53:57 +01:00