Commit Graph

9229 Commits

Author SHA1 Message Date
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
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
Bartosz Kosiorek
8355665f8d ExternalProject: Drop unnecessary 'git submodule init'
Since commit 79410eeb1f (ExternalProject: Initialize Git submodules
recursively and on update (#16083), 2016-04-26, v3.6.0-rc1~105^2) our
`git submodule update` step uses the `--init` flag.  This makes the
prior `git submodule init` unnecessary.
2019-03-14 13:45:35 -04:00
Bartosz Kosiorek
00b5f1a1b5 ExternalProject: Simplify generated 'git clone' scripts
Revise script generation to hard-code selected options instead of
building them with logic inside the script.
2019-03-14 13:44:30 -04:00
Bartosz Kosiorek
98e6822fdf ExternalProject: Re-run 'git clone' when GIT_REMOTE_NAME changes 2019-03-14 13:44:15 -04:00
Radek Nadstawny
b759fa9b8e FindPkgConfig: Set linker flags on imported targets 2019-03-13 23:42:44 +01:00
Brad King
57d178bbca Merge topic 'FindBoost-dyn-link'
05774d4b58 FindBoost: always define BOOST_ALL_DYN_LINK for Boost::dynamic_linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3083
2019-03-12 09:54:23 -04:00
NeroBurner
05774d4b58 FindBoost: always define BOOST_ALL_DYN_LINK for Boost::dynamic_linking
The purpose of the `Boost::dynamic_linking` interface library is to
cause `BOOST_ALL_DYN_LINK` to be defined.  Do this on all platforms
instead of just Windows.

In particular, using Boost::log trivial_logger requires to set
BOOST_ALL_NO_LIB when Boost::Log is compiled as dynamic library.

Fixes: #17813
2019-03-11 13:24:51 -04:00
Brad King
06a59f1bda Merge topic 'FindSWIG-advanced-exe'
4fe56a67d9 FindSWIG: mark_as_advanced SWIG_EXECUTABLE for cleaner cache display

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3077
2019-03-11 10:15:31 -04:00
Brad King
8145876a1f Merge topic 'find-pthread-update'
d53317130e FindThreads: Use complete program to test for pthreads in libc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3040
2019-03-08 09:36:35 -05:00
Sylvain Joubert
4fe56a67d9 FindSWIG: mark_as_advanced SWIG_EXECUTABLE for cleaner cache display 2019-03-08 09:12:51 +01:00
Brad King
d564d06194 Merge topic 'android-versioned-soname'
64e2c14c4a Android: allow user to enable versioned soname

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3063
2019-03-06 08:33:25 -05:00
Brad King
742339a779 Merge topic 'ios-variable'
e427c7c1d8 iOS: Add IOS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3051
2019-03-06 08:27:20 -05:00
JerryShih
d53317130e FindThreads: Use complete program to test for pthreads in libc
Our check for just `pthread_create` is not sufficient because there are
cases where that symbol may be found in libc but not all of pthreads.
We first tried to address this in commit e9a1ddc594 (FindThreads:
Replace the pthread symbol checking in libc., 2018-11-18,
v3.14.0-rc1~292^2) by switching to `pthread_kill`, but that had to be
reverted by commit 18320230ec (FindThreads: Revert libc symbol check to
pthread_create, 2019-02-27, v3.14.0-rc3~6^2) because there are other
cases where `pthread_kill` is in libc but the rest of pthreads is not.
Update our check to try a complete program using pthreads as an actual
application might.

Fixes: #18994
2019-03-06 11:16:32 +08:00
Tom Yan
64e2c14c4a Android: allow user to enable versioned soname 2019-03-05 23:44:42 +08:00
Brad King
509a9409c3 Merge branch 'ios-variable' into release-3.14
Merge-request: !3051
2019-03-05 09:42:58 -05:00
Ruslan Baratov
e427c7c1d8 iOS: Add IOS variable
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) we support setting
`CMAKE_SYSTEM_NAME` to `iOS`.  Existing iOS toolchain files already
set `IOS` as a short-hand variable, so do the same here.
2019-03-05 09:42:41 -05:00
Brad King
6873e98486 Merge topic 'llvm-rc'
e53a968ed5 MSVC: Use -D instead of /D in RC_FLAGS
1a281a1acd RC: Pass output file in a way that llvm-rc 7 and below understand
fa339ced67 CMakeVersion.rc: Avoid preprocessor definitions to support llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3007
2019-03-04 08:42:49 -05:00
Brad King
70d204410a Merge topic 'FindPython-NumPy-fix-include-dir'
8e3358336d FindPython: Fix NumPy component include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3053
2019-03-04 08:36:29 -05:00
Marc Chevrier
8e3358336d FindPython: Fix NumPy component include directory
Update the component added by commit 513e77550d (FindPython: Introduce
NumPy component, 2018-12-12, v3.14.0-rc1~95^2).  The `numpy/`
sub-directory should not be part of the include directory.  It should be
part of the `#include` line.
2019-03-04 08:28:21 -05:00
Brad King
4cda0b66fa Merge topic 'ExternalProject-fix-log-in-custom-stamp'
a6d3fee77c ExternalProject: Restore default log dir with custom stamp dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3045
2019-03-01 09:08:15 -05:00
Brad King
96a99d4069 Merge topic 'findjni-paths'
77cede0977 FindJNI: Unify path search, fix support for Java 9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3042
2019-03-01 09:06:52 -05:00
Brad King
8d9cf29074 Merge branch 'findjni-paths' into release-3.14
Merge-request: !3042
2019-03-01 09:05:57 -05:00
Christian Pfeiffer
77cede0977 FindJNI: Unify path search, fix support for Java 9
Java 9 restructured the standard location of the AWT libraries due to
the removal of the JRE/JDK separation. We should check all possible
combinations of subdirectories to the Java root directories to ensure
that the libraries will be found after an upgrade.

Furthermore, a root directory would contain both, include and library
paths, so the search should be unified to ease maintenance on the
module.
2019-03-01 08:53:26 -05:00
Brad King
0465c32a82 Merge topic 'processor_count_linux_containers'
f20eab9cdc ProcessorCount: Return the container CPU count instead of the host count

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3032
2019-03-01 08:52:37 -05:00
Brad King
9a5fe96f4f Merge topic 'drop-MIPSpro'
e21bae378d WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3043
2019-03-01 08:51:50 -05:00