Commit Graph

10291 Commits

Author SHA1 Message Date
Brad King
d8d4924d98 VS: Fix support for v142 toolset minor versions in VS 16.5+
The fix in commit 5117389931 (VS: Fix support for v142 toolset minor
versions, 2019-10-01, v3.16.0-rc1~32^2) worked around a bug in VS's
placement of toolset files.   VS 16.5 will fix that bug and restore the
original pattern for locations of toolset files.  Update our logic to
look for both possibilities.

Issue: #19779
2019-12-12 11:28:34 -05:00
Brad King
07612646fe VS: Fix support for v142 toolset minor versions in VS 16.5+
The fix in commit 5117389931 (VS: Fix support for v142 toolset minor
versions, 2019-10-01, v3.15.5~6^2) worked around a bug in VS's placement
of toolset files.   VS 16.5 will fix that bug and restore the original
pattern for locations of toolset files.  Update our logic to look for
both possibilities.

Issue: #19779
2019-12-12 11:25:42 -05:00
Kyle Edwards
651b5d157a Merge topic 'cpack-use-CPACK_PACKAGE_HOMEPAGE_URL'
3476dbe6d7 CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4024
2019-12-11 10:59:29 -05:00
Cristian Morales Vega
b328cbaadb FindThreads: Add pthread_cancel to program to test for pthreads in libc
When using ThreadSanitizer our existing CMAKE_HAVE_LIBC_PTHREAD test
program links using symbols from the tsan library.  Among the symbols
not provided by that library, `pthread_cancel()` seems to be the less
risky symbol to add to the check.

Fixes: #19981
2019-12-11 09:26:39 -05:00
Cristian Adam
7a44e16d7f Refactor SDK name to path into a function 2019-12-11 11:55:46 +01:00
Robert Maynard
2467a2b318 CUDA: Add cuda meta-features (e.g. `cuda_std_11`) support 2019-12-10 17:56:48 -05:00
Dietmar Scheidl
676befdf52 ctest: add support for memcheck using Dr. Memory
Fixes: #19788
2019-12-10 14:42:30 -05:00
shibayan
ea882b4aa9 MSVC: Fixed missing import library for Windows 10 ARM64 (Desktop)
Add the same import library as x86/x64 by default for Windows 10 ARM64 (Desktop, not UWP).

Fixes: #20077
2019-12-11 02:40:46 +09:00
Alex Turbov
24fdd51f45 Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIR
Some modules define an intermediate global scope visible variables
to access "resource" files from functions.
Now these variables could be eliminated.
2019-12-10 16:43:27 +02:00
Brad King
db127457e3 Merge topic 'wxwidgets_macos_weakframework' into release-3.16
ada1824dc5 FindwxWidgets: Add support for 3.1.3 on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4126
2019-12-10 09:29:01 -05:00
Brad King
6dffb10444 Merge topic 'wxwidgets_macos_weakframework'
ada1824dc5 FindwxWidgets: Add support for 3.1.3 on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4126
2019-12-10 09:29:01 -05:00
Brad King
724aa9fd3c Merge topic 'toc_on_ppc'
cb984c6627 Check*CompilerFlag: Modernize modules
d806263578 Merge branch 'backport-3.16-toc_on_ppc' into toc_on_ppc
90d8bd2deb Merge branch 'backport-3.15-toc_on_ppc' into backport-3.16-toc_on_ppc
b35926e260 Check for support before adding bigtoc linker flag
958f858ad8 Check for support before adding bigtoc linker flag
8c7b7df788 bootstrap: Add target_link_options command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4122
2019-12-10 09:16:20 -05:00
Tobias Taschner
ada1824dc5 FindwxWidgets: Add support for 3.1.3 on macOS
Previously only -framework was used starting with 3.1.3 -weak_framework
might also be used and has to be handled.
2019-12-10 09:11:14 -05:00
Alex Turbov
3476dbe6d7 CPack: CMAKE_PROJECT_HOMEPAGE_URL -> CPACK_PACKAGE_HOMEPAGE_URL
At CPack running time the `CMAKE_PROJECT_HOMEPAGE_URL` variable
is not set.

Internal CPack modules (e.g. CPackDEB, CPackRPM, CPackFreeBSD)
should use `CPACK_PACKAGE_HOMEPAGE_URL` instead, which is available
after inclusion of `CPack.cmake` into `CMakeLists.txt`.

Closes: #19607
2019-12-09 17:06:10 -05:00
Alexander Grund
cb984c6627 Check*CompilerFlag: Modernize modules
- User lower-case names
- Wrap in function instead of macro to avoid set-unset calls
- Use IN LISTS for foreach
2019-12-09 14:15:42 -05:00
Brad King
3d1a939af1 Merge branch 'backport-3.15-FindGTK2-harfbuzz' into release-3.15
Merge-request: !3877
2019-12-09 13:23:38 -05:00
Markus Mittendrein
e4b1b79abb FindGTK2: Add harfbuzz to GTK2_INCLUDE_DIRS
Fixes: #19531
2019-12-09 12:04:33 -05:00
Brad King
b2634d639b Merge topic 'cuda_updates_for_10.2'
5341f5e4a1 CUDA: get header deps from compiler invocation when possible
7f15c99851 CUDA: forward unknown flags to host compiler when possible.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4099
2019-12-09 11:21:58 -05:00
Brad King
51b87bcc62 Merge topic 'CPackNuGet-version-spec'
161a19e547 CPackNuGet: Fix handling of version specs with '['

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4082
2019-12-09 11:20:55 -05:00
Brad King
1da7fa3b47 Merge topic 'compiler-launcher-env'
6f48c59257 launcher: support setting a compiler launcher through the environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4095
2019-12-09 11:19:57 -05:00
Kyle Edwards
5d6b70ccfe Merge topic 'libarchive-target'
30488b3b9f FindLibArchive: create a target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4117
2019-12-09 09:59:53 -05:00
Tor Arne Vestbø
777d364913 Use xcrun instead of xcodebuild for resolving SDK path
It's much cheaper to run.
2019-12-09 14:55:48 +01:00
Yacoub Hossain
161a19e547 CPackNuGet: Fix handling of version specs with '['
Build a string directly to avoid depending on CMake lists which do
not handle square brackets in values very well.

Fixes: #20010
2019-12-06 09:14:36 -05:00
Brad King
4ec0572736 Merge topic 'vs-clangcl-toolset'
3c125c6de0 VS: Support Visual Studio Clang Toolkit identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4111
2019-12-06 08:37:37 -05:00
T.J. Corona
30488b3b9f FindLibArchive: create a target 2019-12-05 17:18:28 -05:00
Ben Boeckel
6f48c59257 launcher: support setting a compiler launcher through the environment
This makes it much easier to use a launcher for all CMake projects in an
environment rather than having to remember to pass the setting to every
CMake build.
2019-12-05 14:25:36 -05:00
Justin Goshi
3c125c6de0 VS: Support Visual Studio Clang Toolkit identification
Teach CMake that the `ClangCl` toolset uses the `ClangClExecutable`
value as the path to the compiler executable.
2019-12-05 11:48:48 -05:00
Brad King
4c94b53b73 Merge topic 'FindPkgConfig-cross-compile'
f92a4b2399 FindPkgConfig: Fix path manipulations when cross compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4106
2019-12-05 11:47:10 -05:00
Brad King
2557794609 Merge topic 'FindBLAS-atlas-static'
85f4d580c9 FindBLAS: Search for libblas from ATLAS vendor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4105
2019-12-05 11:45:57 -05:00
Brad King
632bd60515 Merge topic 'FindPNG-static-dep-m'
ad41c98cbb FindPNG: add 'm' dependencies to static lib on Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4096
2019-12-05 11:42:33 -05:00
Brad King
158839f0db Merge topic 'FindThreads-lib-flag' into release-3.16
f7ffefea7c FindThreads: Restore hard-coded '-l' flag on library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4112
2019-12-05 11:40:35 -05:00
Brad King
625b120572 Merge topic 'FindThreads-lib-flag'
f7ffefea7c FindThreads: Restore hard-coded '-l' flag on library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4112
2019-12-05 11:40:35 -05:00
Brad King
a795aa145c Merge topic 'pch-xcode-no-warning'
df8372da09 PCH: Do not add #pragma system_header for Xcode generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4098
2019-12-05 11:39:24 -05:00
Eisuke Kawashima
85f4d580c9 FindBLAS: Search for libblas from ATLAS vendor
Symbols such as `cblas_ccopy` are defined in `libblas.a` but NOT IN
`libf77blas.a`.

Fixes: #14320
2019-12-04 14:53:40 -05:00
Brad King
f55593a607 Merge topic 'ninja-tool'
feb5cb8d9d Ninja: Prefer first ninja tool available in PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4091
2019-12-04 14:18:23 -05:00
Brad King
73848a75e8 Merge topic 'cuda_lang_specifies_cmake_library_arch'
974220b714 CUDA: persist CMAKE_LIBRARY_ARCHITECTURE and CUDA version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4090
2019-12-04 14:17:37 -05:00
Brad King
f7ffefea7c FindThreads: Restore hard-coded '-l' flag on library name
Revert commit de5f123d3a (FindThreads: Do not hard-code '-l' flag on
library name, 2019-09-23, v3.16.0-rc1~71^2).  Some clients depend
on the value of `CMAKE_THREAD_LIBS_INIT` to contain a valid flag.

Fixes: #20061, #20065
2019-12-04 13:58:44 -05:00
Cristian Adam
df8372da09 PCH: Do not add #pragma system_header for Xcode generator
Fixes: #20039
2019-12-04 12:56:53 -05:00
Hugo Beauzée-Luyssen
f92a4b2399 FindPkgConfig: Fix path manipulations when cross compiling
When cross compiling from a unix machine, if(UNIX) is false,
whih causes the path not to be fixed for unix, leading to false
negative if PKG_CONFIG_PATH needs to be probed
2019-12-02 16:47:04 +01:00
Robert Maynard
5341f5e4a1 CUDA: get header deps from compiler invocation when possible
Before CUDA 10.2 `nvcc` didn't support providing header dependency
information while compiling.
2019-11-29 14:21:35 -05:00
Robert Maynard
7f15c99851 CUDA: forward unknown flags to host compiler when possible.
Starting with CUDA 10.2 the nvcc compiler has gained support
to automatically forward unknown flags to the host compiler.

This behavior is highly desired as projcts that mix CUDA, C, C++
run into situation where flags such as `-pthread` which aren't
supported by nvcc, are being applied to all source files and
therefore break CUDA compilation.
2019-11-29 14:21:35 -05:00
David Callu
ad41c98cbb FindPNG: add 'm' dependencies to static lib on Linux 2019-11-28 12:15:20 +01:00
Brad King
feb5cb8d9d Ninja: Prefer first ninja tool available in PATH
We search for tools `ninja-build`, `ninja`, and `samu` as the build tool
for the Ninja generator.  Re-order the search to prefer whichever tool
appears first in the `PATH`.  This makes it easier for users to control
which tool gets used when more than one is available.

Fixes: #20028
2019-11-26 11:20:15 -05:00
Brad King
797e55a5ef Merge topic 'xlf-ninja'
19f267c75e XL: Add support for Ninja and XL Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4075
2019-11-26 09:14:33 -05:00
Brad King
4e4327ee3c Merge branch 'backport-implicit-includes-extra-CR' into release-3.15
Merge-request: !4088
2019-11-26 09:03:14 -05:00
Brad King
8db38cfe33 Merge topic 'implicit-includes-extra-CR' into release-3.16
6d84afc7f2 Merge branch 'backport-implicit-includes-extra-CR' into implicit-includes-extra-CR
4b46523d90 CMakeParseImplicitIncludeInfo: Remove all CR chars from compiler output
2a5e5b25ba CMake 3.15.5
08173075c1 Merge branch 'doc-genex-tweak' into release-3.15
83dbef1135 Merge branch 'InstallRequiredSystemLibraries-redist' into release-3.15
881bca249d Merge branch 'vs-v142-csharp-flags' into release-3.15
dec3e9363e Merge branch 'backport-vs-16.4-global-targets' into release-3.15
ac1a1bf18b VS: Tell VS 16.4 not to verify CMake-provided custom command outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4088
2019-11-26 09:02:40 -05:00
Brad King
78a85fd069 Merge topic 'implicit-includes-extra-CR'
6d84afc7f2 Merge branch 'backport-implicit-includes-extra-CR' into implicit-includes-extra-CR
4b46523d90 CMakeParseImplicitIncludeInfo: Remove all CR chars from compiler output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4088
2019-11-26 09:02:40 -05:00
Brad King
6d84afc7f2 Merge branch 'backport-implicit-includes-extra-CR' into implicit-includes-extra-CR 2019-11-26 09:00:38 -05:00
Brad King
5c49f82a2d Merge topic 'FindODBC-mingw'
cb8042b0ab FindODBC: Add library name for MinGW toolchains

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4076
2019-11-26 08:56:33 -05:00
Brad King
0cb043390b Merge topic 'FindODBC-mingw' into release-3.16
cb8042b0ab FindODBC: Add library name for MinGW toolchains

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4076
2019-11-26 08:56:32 -05:00