Commit Graph

9204 Commits

Author SHA1 Message Date
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
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
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
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
Zsolt Parragi
e53a968ed5 MSVC: Use -D instead of /D in RC_FLAGS
llvm-rc can't handle definitions given with /D and without a space.
2019-03-01 14:11:01 +01:00
Brad King
9a54159f53 Merge branch 'ExternalProject-fix-log-in-custom-stamp' into release-3.14
Merge-request: !3045
2019-03-01 08:02:26 -05:00
Brad King
a6d3fee77c ExternalProject: Restore default log dir with custom stamp dir
In commit b6f6cac378 (ExternalProject: add LOG_DIR option that allows
overriding of log location, 2018-10-12, v3.14.0-rc1~515^2~1) the log
directory got its own option.  The intention was to fall back to the
stamp directory by default.  However, the implementation actually only
falls back to the same default as the stamp directory and does not
consider a custom stamp dir.

Update the default log dir computation to fall back to whatever is the
final selection for the stamp dir.

Fixes: #19000
2019-03-01 07:54:17 -05:00
Brad King
e21bae378d WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro
Code removed for MIPSpro by commit 214fcefa52 (Remove now-unused code
once used for MIPSpro on IRIX, 2019-02-21) actually changed a
public-facing API by dropping the `<prefix>_COMPILER_IS_MIPSpro`
definition from the generated compiler detection header.  Restore the
definition hard-coded to `0` since the compiler will never be MIPSpro.

Reported-by: Hans Johnson <hans-johnson@uiowa.edu>
2019-02-28 11:34:36 -05:00
Brad King
8989fa255b Merge topic 'FindThreads-revert-libc-check'
18320230ec FindThreads: Revert libc symbol check to pthread_create
e0267eb1d3 FindThreads: Fix libc check to use proper header for pthread_kill

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !3022
2019-02-28 10:25:03 -05:00
Brad King
e0d7078f6f Merge branch 'FindThreads-revert-libc-check' into release-3.14
Merge-request: !3022
2019-02-27 09:04:11 -05:00
Zsolt Parragi
1a281a1acd RC: Pass output file in a way that llvm-rc 7 and below understand
Prior to LLVM 8.0, `llvm-rc` does not recognize `/fo` without a space
after it.  Add the space unconditionally because MS `rc` accepts it too.

Issue: #18957
2019-02-27 08:39:02 -05:00
Brad King
e994e1f9cd Merge branch 'FindOctave-remove' into release-3.14
Merge-request: !3027
2019-02-27 07:57:03 -05:00
Brad King
ec033b5b80 Merge topic 'FindOctave-remove'
7a1f3fe041 FindOctave: Remove module pending further work

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3027
2019-02-27 07:57:01 -05:00
Brad King
5833739c4a Merge branch 'vs-llvm-extension' into release-3.14
Merge-request: !3024
2019-02-27 07:55:28 -05:00
Brad King
72a6306454 Merge topic 'vs-llvm-extension'
8375c303e2 VS: Fix detection of clang-cl with -T llvm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3024
2019-02-27 07:55:13 -05:00
Brad King
18320230ec FindThreads: Revert libc symbol check to pthread_create
Since commit e9a1ddc594 (FindThreads: Replace the pthread symbol
checking in libc., 2018-11-18, v3.14.0-rc1~292^2) we check libc for
`pthread_kill` instead of `pthread_create`.  However, on FreeBSD
`pthread_kill` is in libc but not `pthread_create`.  Discussion in the
original merge request for the above commit also considered
`pthread_key_create`, `pthread_self`, and `pthread_attr_init`.  Every
symbol seems to have some reason it is not an appropriate choice.

Revert to the pre-3.14 behavior of using `pthread_create` pending
further investigation.
2019-02-27 07:33:31 -05:00
Sylvain Joubert
f20eab9cdc ProcessorCount: Return the container CPU count instead of the host count
On Linux containers (tested with LXC and Docker) getconf returns the
host CPU count.
Use nproc with a higher priority if available to get the container's
allocated CPUs instead of the non-accessible host count.
2019-02-27 13:04:07 +01:00
Brad King
7a1f3fe041 FindOctave: Remove module pending further work
The `FindOctave` module added by commit 170bcb6fdc (FindOctave: Add
module to find GNU octave, 2018-11-17, v3.14.0-rc1~283^2) has a few
problems in its implementation that need to be worked out before the
module can be included in a CMake release.  These were missed during
review.  Remove the module for now.  It can be restored later with a
fresh review.

Issue: #18991
2019-02-26 14:12:34 -05:00
Brad King
78ff8d5737 Merge topic 'cpack-rpm++'
d3ffe90598 CPackRPM: Fix packaging in folders with ++ in name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3008
2019-02-26 11:11:56 -05:00
Brad King
3c7662fd62 Merge topic 'add-xlclang'
d9d285c5ad jsoncpp: Fix include order for build within CMake
0d489fab19 libuv: fix atomic ops compilation with xlclang
1699f5c231 Utilities: Suppress warnings in third-party code when using XLClang
f709089d84 XLClang: Extract compiler implicit include directories
5c41386357 XLClang: Add policy CMP0089 to present as XL for compatibility
8278237933 XL: Remove overlap with the new XLClang compiler ID
6f5cf2d2c6 XL: Revert "Recognize compilers identified by __ibmxl__"
90c6156aa8 XLClang: Add a new compiler ID for the clang-based XL compiler
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2921
2019-02-26 11:07:54 -05:00
Brad King
30fc5ecf23 Merge topic 'qcc-asm-detection'
be87ce43f0 Add ASM Compiler detection for QCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Bartosz <gang65@poczta.onet.pl>
Merge-request: !3016
2019-02-26 10:42:31 -05:00
Brad King
8375c303e2 VS: Fix detection of clang-cl with -T llvm
When using a VS generator with `-T llvm`, MSBuild relies on the "LLVM
Compiler Toolchain" VS Extension.  This does not put `clang-cl` in the
`PATH` inside the build, and LLVM no longer provides a `cl` replacement
either.  Therefore we need another way to extract the path to the
`CMAKE_{C,CXX}_COMPILER`.  Fortunately the LLVM VS integration provides
a `$(ClangClExecutable)` macro we can reference to get the path.

Fixes: #18983
2019-02-26 09:58:51 -05:00
Brad King
e0267eb1d3 FindThreads: Fix libc check to use proper header for pthread_kill
In commit e9a1ddc594 (FindThreads: Replace the pthread symbol checking
in libc., 2018-11-18, v3.14.0-rc1~292^2) we switched to checking for
`pthread_kill` in libc but did not update the symbol check's header file
to match.  Add `signal.h` to get `pthread_kill`.  Keep `pthread.h`
anyway since the purpose of the check is to verify that the pthread API
works.

Fixes: #18984
2019-02-26 07:51:52 -05:00
Harry Mallon
d3ffe90598 CPackRPM: Fix packaging in folders with ++ in name
Construct a regex that can match a path with special characters instead
of treating the path as a regex directly.

Fixes: #18967
2019-02-25 09:46:19 -05:00
Brad King
4d337be994 Merge branch 'qcc-asm-detection' into release-3.14
Merge-request: !3016
2019-02-25 09:33:25 -05:00
Brad King
f709089d84 XLClang: Extract compiler implicit include directories 2019-02-25 08:24:28 -05:00
Chuck Atkins
8278237933 XL: Remove overlap with the new XLClang compiler ID
In commit 6555286c55 (XL: Add C and C++ language level flags,
2017-04-27, v3.9.0-rc1~184^2) we added support for both the traditional
XL compiler and the Clang-based variant used on Linux.  The latter is
now handled by `Modules/Compiler/XLClang-{C,CXX}.cmake` using the
`XLClang` compiler id.  Drop the corresponding content from the
traditional XL compiler modules.
2019-02-25 08:24:28 -05:00
Brad King
6f5cf2d2c6 XL: Revert "Recognize compilers identified by __ibmxl__"
Revert commit eb1a9be4b6 (XL: Recognize compilers identified by
__ibmxl__, 2018-03-05, v3.11.0-rc3~4^2).  It is no longer needed because
we now use `__ibmxl__` to identify with compiler id `XLClang`.
2019-02-25 08:24:28 -05:00
Chuck Atkins
90c6156aa8 XLClang: Add a new compiler ID for the clang-based XL compiler 2019-02-25 08:24:28 -05:00